Open Closed

Invalid Redirect URL error even though the URL is correct #7963


User avatar
0
Sergei.Gorlovetsky created

Hello, I am getting this error though my redirect URL is correct

UI: https://ideasemr-staging.mellowoodtest.com/ API: https://ideasemr-staging.api.mellowoodtest.com/

earlier it was working fine before I added custom domains in Azure.

After custom domains, I updated appsettings.json file with new URLs and run the migration.

Screenshot of OpenIddictApplications table

2024-09-23T14:50:17.421053363Z: [INFO] [14:50:17 INF] Client validation failed because 'https://ideasemr-staging.mellowoodtest.com/' was not a valid redirect_uri for ClinicSaas_App. 2024-09-23T14:50:17.434400280Z: [INFO] [14:50:17 INF] The authorization request was rejected because the redirect_uri was invalid: 'https://ideasemr-staging.mellowoodtest.com/'. 2024-09-23T14:50:17.434435580Z: [INFO] [14:50:17 INF] Request finished HTTP/1.1 GET https://ideasemr-staging.api.mellowoodtest.com/connect/authorize?response_type=code&client_id=ClinicSaas_App&state=dE9BV3FhZ0F-NTRUSC1fdXRCcXR1U3oxM1NRMVZrYkMzbS0wNjJRTEZpdVlK&redirect_uri=https%3A%2F%2Fideasemr-staging.mellowoodtest.com%2F&scope=openid%20offline_access%20ClinicSaas&code_challenge=DSbWa0M4DBQp9-_mq6nNF8etCriOyDd_KF5pE3ug6M0&code_challenge_method=S256&nonce=dE9BV3FhZ0F-NTRUSC1fdXRCcXR1U3oxM1NRMVZrYkMzbS0wNjJRTEZpdVlK&culture=en&ui-culture=en - 302 0 null 34.8173ms 2024-09-23T14:50:17.477596957Z: [INFO] [14:50:17 INF] Request starting HTTP/1.1 GET http://ideasemr-staging.api.mellowoodtest.com/Error?httpStatusCode=400 - null null 2024-09-23T14:50:17.481191988Z: [INFO] [14:50:17 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-09-23T14:50:17.481760393Z: [INFO] [14:50:17 INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2024-09-23T14:50:17.490305667Z: [INFO] [14:50:17 INF] Executing action method Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) - Validation state: Valid 2024-09-23T14:50:17.490330268Z: [INFO] [14:50:17 INF] Executed action method Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared), returned result Microsoft.AspNetCore.Mvc.ViewResult in 0.1206ms. 2024-09-23T14:50:17.490399568Z: [INFO] [14:50:17 INF] Executing ViewResult, running view ~/Views/Error/Default.cshtml. 2024-09-23T14:50:17.499717950Z: [INFO] [14:50:17 INF] Executed ViewResult - view ~/Views/Error/Default.cshtml executed in 10.6116ms. 2024-09-23T14:50:17.500032052Z: [INFO] [14:50:17 INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 17.4529ms 2024-09-23T14:50:17.500051752Z: [INFO] [14:50:17 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)'


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    can you add / to redirect_uri

  • User Avatar
    0
    Sergei.Gorlovetsky created

    Thanks it works. I thought it will be able to handle / this minor thing automatically.

    Please update it here on documents page. I did not realize it will be this much strict validation.

    https://abp.io/docs/commercial/latest/startup-templates/application/azure-deployment/step2-configuration-application?UI=NG&DB=EF&Tiered=No#step-2-customizing-the-configuration-of-the-abp-application

Made with ❤️ on ABP v9.0.0-preview Updated on September 27, 2024, 06:34