Browse Source
Merge pull request #6987 from vvlladd28/bug/redirect-previos-url/mfa
[3.4.1] UI: Not redirect to the previous link after login with 2FA
pull/7084/head
Igor Kulikov
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
ui-ngx/src/app/core/auth/auth.service.ts
|
|
|
@ -268,7 +268,9 @@ export class AuthService { |
|
|
|
public defaultUrl(isAuthenticated: boolean, authState?: AuthState, path?: string, params?: any): UrlTree { |
|
|
|
let result: UrlTree = null; |
|
|
|
if (isAuthenticated) { |
|
|
|
if (!path || path === 'login' || this.forceDefaultPlace(authState, path, params)) { |
|
|
|
if (authState.authUser.authority === Authority.PRE_VERIFICATION_TOKEN) { |
|
|
|
result = this.router.parseUrl('login/mfa'); |
|
|
|
} else if (!path || path === 'login' || this.forceDefaultPlace(authState, path, params)) { |
|
|
|
if (this.redirectUrl) { |
|
|
|
const redirectUrl = this.redirectUrl; |
|
|
|
this.redirectUrl = null; |
|
|
|
|