From 53d3c4bbf8ba8c2c33ac76e0375d93f89d703349 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Wed, 2 Apr 2025 13:36:15 +0700 Subject: [PATCH] fix: loading spinner displayed and user stuck after signin --- src/libs/API/parameters/LogOutParams.ts | 1 + src/libs/actions/Session/index.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libs/API/parameters/LogOutParams.ts b/src/libs/API/parameters/LogOutParams.ts index 7cb81080b19f..aaf4959d8c0a 100644 --- a/src/libs/API/parameters/LogOutParams.ts +++ b/src/libs/API/parameters/LogOutParams.ts @@ -4,6 +4,7 @@ type LogOutParams = { partnerName: string; partnerPassword: string; shouldRetry: boolean; + skipReauthentication?: boolean; }; export default LogOutParams; diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts index 603950c4b139..1947ef7a97c0 100644 --- a/src/libs/actions/Session/index.ts +++ b/src/libs/actions/Session/index.ts @@ -14,6 +14,7 @@ import type { BeginGoogleSignInParams, BeginSignInParams, DisableTwoFactorAuthParams, + LogOutParams, RequestAccountValidationLinkParams, RequestNewValidateCodeParams, RequestUnlinkValidationLinkParams, @@ -189,13 +190,14 @@ function signInWithSupportAuthToken(authToken: string) { */ function signOut(): Promise { Log.info('Flushing logs before signing out', true, {}, true); - const params = { + const params: LogOutParams = { // Send current authToken because we will immediately clear it once triggering this command authToken: NetworkStore.getAuthToken() ?? null, partnerUserID: credentials?.autoGeneratedLogin ?? '', partnerName: CONFIG.EXPENSIFY.PARTNER_NAME, partnerPassword: CONFIG.EXPENSIFY.PARTNER_PASSWORD, shouldRetry: false, + skipReauthentication: true, }; // eslint-disable-next-line rulesdir/no-api-side-effects-method