0

I want users to redirect to log in each time they open Angular 6 SPA that is secured with identity sever as authorization server with angular-oauth-oidc.

I am using OAuth 2.0 implicit flow for users to log in with Angular SPA.

I tried with clearing sessionStorage or localStorage but It is not working. How can I implement above using this library ?

this.oauthService.configure(authConfig);
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
this.oauthService.loadDiscoveryDocumentAndTryLogin().then(() => {
  // If there is a valid access token
  if (this.oauthService.hasValidAccessToken()) {
  }
});
Gopal Zadafiya
  • 274
  • 2
  • 10
  • Set `prompt=login` ([see documentation](http://docs.identityserver.io/en/latest/endpoints/authorize.html)) to disable SSO. Otherwise the user may be authenticated automatically. –  Feb 04 '20 at 11:33
  • could this be possible from client side like using auth config for amgular-oauth2-oidc ? – Gopal Zadafiya Feb 04 '20 at 11:55

0 Answers0