From 785c1c6c2f82541e4e55d6160a9920ff6200ddeb Mon Sep 17 00:00:00 2001 From: Archit Date: Tue, 6 May 2025 16:33:54 +0530 Subject: [PATCH] fixes redirect in manage MFA --- src/core/auth.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/auth.ts b/src/core/auth.ts index 1e1bbc17..de4a6498 100644 --- a/src/core/auth.ts +++ b/src/core/auth.ts @@ -338,7 +338,6 @@ export class Auth { // in case of redirect mode, redirect url will be dapp specified // in case of popup mode, redirect url will be sdk specified const defaultParams = { - redirectUrl: `${this.dashboardUrl}/wallet/account`, dappUrl: `${window.location.origin}${window.location.pathname}`, }; @@ -347,7 +346,12 @@ export class Auth { const dataObject: AuthSessionConfig = { actionType: AUTH_ACTIONS.MANAGE_MFA, // manage mfa always opens in a new tab, so need to fix the uxMode to redirect. - options: { ...this.options, uxMode: "redirect", sdkMode: SDK_MODE.DEFAULT }, + options: { + ...this.options, + uxMode: UX_MODE.REDIRECT, + sdkMode: SDK_MODE.DEFAULT, + redirectUrl: `${this.dashboardUrl}/wallet/account`, + }, params: { ...defaultParams, ...params,