Ends in:
0 DAY
9 HRS
16 MIN
18 SEC
Ends in:
0 D
9 H
16 M
18 S
Open Closed

Override LoginPath/URL in OpenIddict #4086


User avatar
0
mattw@agilenova.com created

I am interested in redirecting the user to the registration page (/Account/Register) instead of the login page (/Account/Login) in some cases. I believe OpenIddict supports changing the path but I'm not sure how this should be done within ABP or done dynamically.

I have two questions:

  1. How can I change the login path used by OpenIddict in ABP 6.x?
  2. Can I determine the login path during authorization? i.e.) Use a request parameter on authorize to tell openiddict to use a specific login path.

Any advice is appreciated!

  • Grant Type: Auth Code
  • ABP Framework version: v6.0.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can add some parameters on the OnRedirectToIdentityProvider method of OpenIdConnectOptions.

    Then get parameters on OpenIddictSupportedLoginModel class.

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.authentication.openidconnect.openidconnectevents.onredirecttoidentityprovider?view=aspnetcore-7.0

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19