Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/libs/API/parameters/LogOutParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ type LogOutParams = {
partnerName: string;
partnerPassword: string;
shouldRetry: boolean;
skipReauthentication?: boolean;
};

export default LogOutParams;
4 changes: 3 additions & 1 deletion src/libs/actions/Session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {
BeginGoogleSignInParams,
BeginSignInParams,
DisableTwoFactorAuthParams,
LogOutParams,
RequestAccountValidationLinkParams,
RequestNewValidateCodeParams,
RequestUnlinkValidationLinkParams,
Expand Down Expand Up @@ -197,13 +198,14 @@ function signInWithSupportAuthToken(authToken: string) {
*/
function signOut(): Promise<void | Response> {
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
Expand Down