Askar Sanbayev
Askar Sanbayev

Reputation: 57

Authentication context is null,getting error page

Following steps can be used to recreate this.

  1. Create a valid login request.
  2. Click back in browser
  3. Try to login with valid credentials
TID: [-1234] [] [2021-02-15 17:31:28,787] [6b1c0dfe-00f5-485a-9d33-443a4d4790ca] ERROR {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator} - Context does not exist. Probably due to invalidated cache. Requested client: my ip, URI :POST:/commonauth, User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 , Referer: https://aisoip-dev2.alseco.kz/authenticationendpoint/login.do?%3Fclient_id=Qlf9xILuytVmWx915VTdqOuyxkoa&commonAuthCallerPath=%2Foauth2%2Fauthorize&forceAuth=false&nonce=9VPTztKjSDA2dSKblCNjqPG4swm8Ah-KO3YHEX708Bg&passiveAuth=false&redirect_uri=https%3A%2F%2Faisoip-tst2.alseco.kz%2Fauth&response_type=code&scope=openid&state=vH2oJ7aDTFOj6mJplSaHEECpG1qdR_rq0JrkqSflGPQ%3D&tenantDomain=carbon.super&sessionDataKey=4eecaf00-8e55-45d5-94f3-d5e77ae3dba7&relyingParty=Qlf9xILuytVmWx915VTdqOuyxkoa&type=oidc&sp=AISOIP&isSaaSApp=false&authenticators=BasicAuthenticator%3ALOCAL%3BAuthCertificateAuthenticator%3ALOCAL%3ALOCAL&authFailure=true&authFailureMsg=login.fail.message
TID: [-1234] [] [2021-02-15 17:31:28,794] [6b1c0dfe-00f5-485a-9d33-443a4d4790ca]  WARN {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator} - Authentication context is null, redirect parameter filtering will not be done for 4eecaf00-8e55-45d5-94f3-d5e77ae3dba7

Upvotes: 1

Views: 1868

Answers (1)

Anuradha Karunarathna
Anuradha Karunarathna

Reputation: 3057

Using the same sessionDataKey twice causes return authentication context as null, and you will end up with an error page. Browser bank button support and using saved links for login page can be used without such error if you follow the handling browser back button and bookmarked login page.

What you have to do here is, adding a registry resource that will contain redirect URLs of different service providers that you configure.

  1. Navigate to Main Menu -> Registry -> Browse by login into the management console.
  2. Add resource under /_system/config/identity/config by selecting the method Create text content and giving the resource name relyingPartyRedirectUrls
  3. Navigate into the created relyingPartyRedirectUrls resource and add a property.
  4. Property name should be the Relying party name and value should be the redirect URL.
  • If you are configuring this for a SAML app: property name -> "Issuer Name" of the app

  • If you are configuring this for an Oauth app: property name -> "OAuth Client Key" of the app

Upvotes: 3

Related Questions