From 7bceb03e24e8079f90155851b4f949008fc4edcc Mon Sep 17 00:00:00 2001 From: bnymncoskuner Date: Fri, 2 Oct 2020 17:19:18 +0300 Subject: [PATCH 1/2] feat: redirect instead of new tab on manageProfile --- .../packages/account/src/lib/guards/manage-profile.guard.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/account/src/lib/guards/manage-profile.guard.ts b/npm/ng-packs/packages/account/src/lib/guards/manage-profile.guard.ts index ca840bd913..2770fa24bd 100644 --- a/npm/ng-packs/packages/account/src/lib/guards/manage-profile.guard.ts +++ b/npm/ng-packs/packages/account/src/lib/guards/manage-profile.guard.ts @@ -9,7 +9,9 @@ export class ManageProfileGuard implements CanActivate { canActivate(_: ActivatedRouteSnapshot, __: RouterStateSnapshot) { const env = this.configState.getEnvironment(); if (env.oAuthConfig.responseType === 'code') { - window.open(`${env.oAuthConfig.issuer}/Account/Manage`, '_blank'); + window.location.replace( + `${env.oAuthConfig.issuer}/Account/Manage?returnUrl=${window.location.href}`, + ); return false; } else { return true; From ab705e9d956bc8fe804f7ba564be6581bb27c680 Mon Sep 17 00:00:00 2001 From: Bunyamin Coskuner Date: Tue, 6 Oct 2020 17:23:59 +0300 Subject: [PATCH 2/2] Update npm/ng-packs/packages/account/src/lib/guards/manage-profile.guard.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Levent Arman Özak --- .../packages/account/src/lib/guards/manage-profile.guard.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/npm/ng-packs/packages/account/src/lib/guards/manage-profile.guard.ts b/npm/ng-packs/packages/account/src/lib/guards/manage-profile.guard.ts index 2770fa24bd..4a5b5a0709 100644 --- a/npm/ng-packs/packages/account/src/lib/guards/manage-profile.guard.ts +++ b/npm/ng-packs/packages/account/src/lib/guards/manage-profile.guard.ts @@ -9,9 +9,7 @@ export class ManageProfileGuard implements CanActivate { canActivate(_: ActivatedRouteSnapshot, __: RouterStateSnapshot) { const env = this.configState.getEnvironment(); if (env.oAuthConfig.responseType === 'code') { - window.location.replace( - `${env.oAuthConfig.issuer}/Account/Manage?returnUrl=${window.location.href}`, - ); + window.location.href = `${env.oAuthConfig.issuer}/Account/Manage?returnUrl=${window.location.href}`; return false; } else { return true;