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
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.
Most helpful comment
You can use the events/notifications of the OIDC handler/middleware.