Browse Source
Merge pull request #18831 from abpframework/auto-merge/rel-8-0/2439
Merge branch dev with rel-8.0
pull/18839/head
maliming
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
4 deletions
-
npm/ng-packs/packages/oauth/src/lib/strategies/auth-flow-strategy.ts
|
|
|
@ -99,10 +99,10 @@ export abstract class AuthFlowStrategy { |
|
|
|
filter(event => event.type === 'token_received' && !!this.oAuthService.state), |
|
|
|
take(1), |
|
|
|
map(() => { |
|
|
|
const redirect_uri = decodeURIComponent(this.oAuthService.state); |
|
|
|
const redirectUri = decodeURIComponent(this.oAuthService.state); |
|
|
|
|
|
|
|
if (redirect_uri && redirect_uri !== '/') { |
|
|
|
return redirect_uri; |
|
|
|
if (redirectUri && redirectUri !== '/') { |
|
|
|
return redirectUri; |
|
|
|
} |
|
|
|
|
|
|
|
return '/'; |
|
|
|
@ -110,7 +110,7 @@ export abstract class AuthFlowStrategy { |
|
|
|
switchMap(redirectUri => |
|
|
|
this.configState.getOne$('currentUser').pipe( |
|
|
|
filter(user => !!user?.isAuthenticated), |
|
|
|
tap(() => this.router.navigate([redirectUri])), |
|
|
|
tap(() => this.router.navigateByUrl(redirectUri)), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
|