Angular-oauth2-oidc - Angular SSO(Single SignIn On) oAuth2

37 Views Asked by At

After logging out and clearing session storage, the issue persists where the login form doesn't prompt for the account upon the next login. Various authentication flows such as loadDiscoveryDocumentAndTryLogin, loadDiscoveryDocumentAndLogin, and loadDiscoveryDocument have been tried without success.

I want the login form when i try to login next time.

1

There are 1 best solutions below

0
Michal Trojanowski On

You would have to clear all the cookies and/or log out directly in the authorization server. Logging out in your app does not automatically log out the user from the server.

Alternatively, you can pass this config option to your flow:

customQueryParams: {
    prompt: "login"
}

This will add the prompt=login parameter to the authorization request. This tells the authorization server to always show the login screen and not rely on the SSO session. However, this has to be properly implemented on the server side, so it depends on which IDP you're using and whether that provider supports the prompt=login option.