Page MenuHomePhabricator

D12679.diff
No OneTemporary

D12679.diff

diff --git a/native/components/background-identity-login-handler.react.js b/native/components/background-identity-login-handler.react.js
--- a/native/components/background-identity-login-handler.react.js
+++ b/native/components/background-identity-login-handler.react.js
@@ -34,8 +34,15 @@
Alert.alert('Security update', securityUpdateLogoutText, [{ text: 'OK' }]);
}, [dispatchActionPromise, callLogOut]);
+ const loginAttemptedRef = React.useRef(false);
+
const logInIfPossibleElseLogOut = React.useCallback(async () => {
- if (hasAccessToken || !dataLoaded || !usingCommServicesAccessToken) {
+ if (
+ hasAccessToken ||
+ !dataLoaded ||
+ !usingCommServicesAccessToken ||
+ loginAttemptedRef.current
+ ) {
return;
}
@@ -53,6 +60,11 @@
return;
}
+ if (loginAttemptedRef.current) {
+ return;
+ }
+ loginAttemptedRef.current = true;
+
const logInPromise = callIdentityPasswordLogIn(
nativeCredentials.username,
nativeCredentials.password,

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 2, 12:31 PM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2607596
Default Alt Text
D12679.diff (1 KB)

Event Timeline