Browse Source

Merge pull request #19702 from abpframework/sinan/auth-flow

pass `noRedirectToLogoutUrl` parameter to logout method
pull/19710/head
Masum ULU 2 years ago
committed by GitHub
parent
commit
abde04d019
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      npm/ng-packs/packages/oauth/src/lib/strategies/auth-code-flow-strategy.ts
  2. 2
      npm/ng-packs/packages/theme-shared/src/lib/services/authentication-error-handler.service.ts

4
npm/ng-packs/packages/oauth/src/lib/strategies/auth-code-flow-strategy.ts

@ -51,6 +51,10 @@ export class AuthCodeFlowStrategy extends AuthFlowStrategy {
logout(queryParams?: Params) {
this.rememberMeService.remove();
if (queryParams?.noRedirectToLogoutUrl) {
this.router.navigate(['/']);
return from(this.oAuthService.revokeTokenAndLogout(true));
}
return from(this.oAuthService.revokeTokenAndLogout(this.getCultureParams(queryParams)));
}

2
npm/ng-packs/packages/theme-shared/src/lib/services/authentication-error-handler.service.ts

@ -17,7 +17,7 @@ export class AbpAuthenticationErrorHandler implements CustomHttpErrorHandlerServ
execute() {
this.configStateService.refreshAppState().subscribe(({ currentUser }) => {
if (!currentUser.isAuthenticated) {
this.authService.logout();
this.authService.logout({ noRedirectToLogoutUrl: true });
}
});
}

Loading…
Cancel
Save