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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
1 deletions
-
npm/ng-packs/packages/oauth/src/lib/strategies/auth-code-flow-strategy.ts
-
npm/ng-packs/packages/theme-shared/src/lib/services/authentication-error-handler.service.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))); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -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 }); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|