Skip to content

Commit

Permalink
comment patch
Browse files Browse the repository at this point in the history
  • Loading branch information
rushatgabhane committed Jul 24, 2024
1 parent 0a9c4e6 commit 52d68a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/Session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ function validateTwoFactorAuth(twoFactorAuthCode: string, shouldClearData: boole
return;
}

// When the user is forced to add 2FA, we should clear Onyx data.
// Clear onyx data if the user has just signed in and is forced to add 2FA
if (shouldClearData) {
const keysToPreserveWithPrivatePersonalDetails = [...KEYS_TO_PRESERVE, ONYXKEYS.PRIVATE_PERSONAL_DETAILS];
Onyx.clear(keysToPreserveWithPrivatePersonalDetails).then(() => updateAuthTokenAndOpenApp(response.authToken, response.encryptedAuthToken));
Expand Down

0 comments on commit 52d68a0

Please sign in to comment.