Skip to content

Commit 459ac37

Browse files
Merge pull request Expensify#65298 from Expensify/revert-63650-use-staging-server-persistence
[No QA] Revert "fix: Persist troubleshooting flags across login sessions"
2 parents 2a8b75d + b8b6b4e commit 459ac37

2 files changed

Lines changed: 1 addition & 11 deletions

File tree

src/libs/actions/SignInRedirect.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,11 @@ function clearStorageAndRedirect(errorMessage?: string): Promise<void> {
3434
keysToPreserve.push(ONYXKEYS.NETWORK);
3535
}
3636

37-
// Preserve troubleshooting flags
38-
keysToPreserve.push(ONYXKEYS.APP_PROFILING_IN_PROGRESS);
39-
keysToPreserve.push(ONYXKEYS.SHOULD_STORE_LOGS);
40-
keysToPreserve.push(ONYXKEYS.SHOULD_MASK_ONYX_STATE);
41-
42-
// Preserve account settings (staging server, debug mode, etc.) across logout
43-
keysToPreserve.push(ONYXKEYS.ACCOUNT);
44-
4537
return Onyx.clear(keysToPreserve).then(() => {
4638
if (CONFIG.IS_HYBRID_APP) {
4739
resetSignInFlow();
4840
}
4941
clearAllPolicies();
50-
5142
if (!errorMessage) {
5243
return;
5344
}

src/pages/signin/SignInPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ function getRenderOptions({
108108
// SAML required users may reload the login page after having already entered their login details, in which
109109
// case we want to clear their sign in data so they don't end up in an infinite loop redirecting back to their
110110
// SSO provider's login page
111-
// Don't clear if we don't have account data - this prevents clearing during app resets when state is inconsistent
112-
if (hasAccount && hasLogin && isSAMLRequired && !shouldInitiateSAMLLogin && !hasInitiatedSAMLLogin && !account.isLoading) {
111+
if (hasLogin && isSAMLRequired && !shouldInitiateSAMLLogin && !hasInitiatedSAMLLogin && !account.isLoading) {
113112
clearSignInData();
114113
}
115114

0 commit comments

Comments
 (0)