Browse Source

Merge pull request #10571 from abpframework/feat/10089

Angular UI: Redirected to the login page when token expired
pull/10573/head
Bunyamin Coskuner 5 years ago
committed by GitHub
parent
commit
ac7f3419bd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      npm/ng-packs/packages/core/src/lib/strategies/auth-flow.strategy.ts

5
npm/ng-packs/packages/core/src/lib/strategies/auth-flow.strategy.ts

@ -60,6 +60,11 @@ export abstract class AuthFlowStrategy {
if (shouldClear) clearOAuthStorage(oAuthStorage);
this.oAuthService.configure(this.oAuthConfig);
this.oAuthService.events
.pipe(filter(event => event.type === 'token_refresh_error'))
.subscribe(() => this.navigateToLogin());
return this.oAuthService
.loadDiscoveryDocument()
.then(() => {

Loading…
Cancel
Save