identityserver4openid-connectoidc-client

Identity Server 4 AuthorizationContext.PromptModes empty


I am using the oidc-client library to authorize with our own Identity Server 4. It is working fine and I need to extend the login functionality. I'd like to use the OIDC-Parameter "prompt". The parameter is sent correctly to the connect/authorize endpoint. When the Login-Method is called, I am trying to get the AuthorizationContext by calling

        var context = await _interaction.GetAuthorizationContextAsync(vm.ReturnUrl);
        var prompt = context.PromptModes;

_interaction is an instance of IIdentityServerInteractionService. The PromptModes are always empty. Is this the right way I am trying to access them?

Thank you


Solution

  • It looks like you check the value in an inappropriate place. The answer for a similar question on Github was:

    we have to remove the prompt parameter because we would otherwise run into an endless loop. You could save the parameter in a separate parameter I guess.