Auth: Fix auth screen stuck when logged out from other device (#2697)
This commit is contained in:
parent
771eb6ff4e
commit
9213919c55
@ -209,16 +209,7 @@ function onUpdateConnectionState<T extends GlobalState>(
|
||||
setGlobal(global);
|
||||
|
||||
if (connectionState === 'connectionStateBroken') {
|
||||
// When mounting Auth `initApi` will be called from an effect. Otherwise, we force it here.
|
||||
const isOnAuth = !global.authState || [
|
||||
'authorizationStateWaitPhoneNumber',
|
||||
'authorizationStateWaitCode',
|
||||
'authorizationStateWaitPassword',
|
||||
'authorizationStateWaitRegistration',
|
||||
'authorizationStateWaitQrCode',
|
||||
].includes(global.authState);
|
||||
|
||||
actions.signOut({ forceInitApi: isOnAuth });
|
||||
actions.signOut({ forceInitApi: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user