From 4dfbbd8a8916e6784a4d3cb0d6ed0495b66a8a97 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Mon, 8 Jul 2024 16:58:19 +0530 Subject: [PATCH 1/3] Fixed Login Window --- sdk/src/platform/Platform.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/platform/Platform.ts b/sdk/src/platform/Platform.ts index e8677ac..eb653e6 100644 --- a/sdk/src/platform/Platform.ts +++ b/sdk/src/platform/Platform.ts @@ -358,7 +358,7 @@ export default class Platform extends EventEmitter { height = 600, origin = window.location.origin, property = Constants.authResponseProperty, - target = '_blank', + target = '_self', }: LoginWindowOptions): Promise { // clear check last timeout when user open loginWindow twice to avoid leak this._clearLoginWindowCheckTimeout(); @@ -378,7 +378,7 @@ export default class Platform extends EventEmitter { const win = window.open( url, - '_blank', + '_self', target === '_blank' ? `scrollbars=yes, status=yes, width=${width}, height=${height}, left=${left}, top=${top}` : '', From 98980dd9dca353c16cf1601dcdd0a3c2cdb49de4 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Thu, 11 Jul 2024 11:28:44 +0530 Subject: [PATCH 2/3] Change target _selft to RingCentralLoginWindow --- sdk/src/platform/Platform.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/platform/Platform.ts b/sdk/src/platform/Platform.ts index eb653e6..37d87c4 100644 --- a/sdk/src/platform/Platform.ts +++ b/sdk/src/platform/Platform.ts @@ -358,7 +358,7 @@ export default class Platform extends EventEmitter { height = 600, origin = window.location.origin, property = Constants.authResponseProperty, - target = '_self', + target = 'RingCentralLoginWindow', }: LoginWindowOptions): Promise { // clear check last timeout when user open loginWindow twice to avoid leak this._clearLoginWindowCheckTimeout(); @@ -378,7 +378,7 @@ export default class Platform extends EventEmitter { const win = window.open( url, - '_self', + 'RingCentralLoginWindow', target === '_blank' ? `scrollbars=yes, status=yes, width=${width}, height=${height}, left=${left}, top=${top}` : '', From 68d5206e67f9d0e801a369b67118cbfdabf402d0 Mon Sep 17 00:00:00 2001 From: SushilMallRC Date: Thu, 11 Jul 2024 11:54:21 +0530 Subject: [PATCH 3/3] typo --- sdk/src/platform/Platform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/src/platform/Platform.ts b/sdk/src/platform/Platform.ts index 37d87c4..e79de49 100644 --- a/sdk/src/platform/Platform.ts +++ b/sdk/src/platform/Platform.ts @@ -378,7 +378,7 @@ export default class Platform extends EventEmitter { const win = window.open( url, - 'RingCentralLoginWindow', + target, target === '_blank' ? `scrollbars=yes, status=yes, width=${width}, height=${height}, left=${left}, top=${top}` : '',