Search code examples
identityserver4asp.net-core-identity

How to pass ui_locales from AuthorizeRequest to the controller


In Identityserver3 there was the SignInMessage that was created in the AuthorizeInteractionResponseGenerator. But in IdentityServer4 there is no SignInMessage passed to my Login action.

So how do I pass through the ui_locales that is given in the authorize call?


Solution

  • I figured it out. I need to inject the IIdentityServerInteractionService in my controller. Then in my Login action I can get the authorization context like

    var context = await _interaction.GetAuthorizationContextAsync(returnUrl);
    

    This context contains the UILocales.