Open Closed

Okta integration with ASP net zero application #9864

smartlayer created


Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 6.8.0
  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .net framework

I am trying to integrate Okta SSO with Aspnetzero and I am getting below error: -

IDX21323: RequireNonce is 'System.Boolean'. OpenIdConnectProtocolValidationContext.Nonce was null, OpenIdConnectProtocol.ValidatedIdToken.Payload.Nonce was not null. The nonce cannot be validated. If you don't need to check the nonce, set OpenIdConnectProtocolValidator.RequireNonce to 'false'. Note if a 'nonce' is found it will be evaluated.

I have taken the reference from the below URL: - The sample code works fine. However, when I try to integrate the code with Aspnetzero I am getting error.

Below the code I am using: - In startup file under configuration I have added: -

When I run the code it redirects me to the okta login. But when I try to login I am getting error mentioned above.

Below are the settings that I have done in my okta account application:

Please let me know what i am missing.


4 Answer(s)
  • 0
    musa.demir created
    Support Team

    Hi @smartlayer Your problem looks like a cookie problem. If you check that forum report, they say that it is not happening on production which published with https. And they also provide a solution to use in the development process.

  • 0
    smartlayer created

    After login using Okta SSO I am getting below error:

  • 0
    smartlayer created

    We are able to receive success response from OKTA however it is not getting mapped to application user. Following code always return null.

    var loginInfo = await _authenticationManager.GetExternalLoginInfoAsync();

    What is it looking for and how can we resolve it?

  • 0
    ismcagdas created
    Support Team

    Hi @smartlayer

    If this method fails somehow, you should get the error message below;

    Could not get information from external login.

    Can you debug the source code and see where it fails in ExternalLoginCallback ?