Identityserver4: Parameterize the LoginUrl in IdentityServer?

Created on 9 Oct 2017  路  4Comments  路  Source: IdentityServer/IdentityServer4

I have been trying to add a parameter in the Login URL. E.g.

services.AddIdentityServer(options =>
                {
                    options.UserInteraction.LoginUrl = "/{culture}/account/login";
                });

Is it possible to have such types of parameterized URLs? Also, how would I pass this culture from my (JavaScript) client application?
Thanks

question

Most helpful comment

You can use the events/notifications of the OIDC handler/middleware.

All 4 comments

No, we don't have a way to support that. But culture as part of the request is already supported: Check the ui_locales param: https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest

And then in your login you can get those: https://github.com/IdentityServer/IdentityServer4/blob/dev/src/IdentityServer4/Models/Messages/AuthorizationRequest.cs#L46 when you query the interaction service.

Getting culture by querying interaction service works like a charm, but my question is how to set ui_locales query string in Authentication Request from MVC Client?

You can use the events/notifications of the OIDC handler/middleware.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings