Fix Web Token login (again 2) (#2140)

This commit is contained in:
Alexander Zinchuk 2022-11-18 00:57:13 +04:00
parent d6972c2a6f
commit 9435381b24
2 changed files with 12 additions and 4 deletions

View File

@ -111,11 +111,19 @@ function onUpdateAuthorizationState(update: ApiUpdateAuthorizationState) {
}); });
break; break;
case 'authorizationStateWaitPassword': case 'authorizationStateWaitPassword':
setGlobal({ global = {
...global, ...global,
authHint: update.hint, authHint: update.hint,
hasWebAuthTokenPasswordRequired: update.noReset, };
});
if (update.noReset) {
global = {
...global,
hasWebAuthTokenPasswordRequired: true,
};
}
setGlobal(global);
break; break;
case 'authorizationStateWaitQrCode': case 'authorizationStateWaitQrCode':
setGlobal({ setGlobal({

View File

@ -141,7 +141,7 @@ export type GlobalState = {
appConfig?: ApiAppConfig; appConfig?: ApiAppConfig;
canInstall?: boolean; canInstall?: boolean;
hasWebAuthTokenFailed?: boolean; hasWebAuthTokenFailed?: boolean;
hasWebAuthTokenPasswordRequired?: boolean; hasWebAuthTokenPasswordRequired?: true;
isChatInfoShown: boolean; isChatInfoShown: boolean;
isStatisticsShown?: boolean; isStatisticsShown?: boolean;
isLeftColumnShown: boolean; isLeftColumnShown: boolean;