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;
case 'authorizationStateWaitPassword':
setGlobal({
global = {
...global,
authHint: update.hint,
hasWebAuthTokenPasswordRequired: update.noReset,
});
};
if (update.noReset) {
global = {
...global,
hasWebAuthTokenPasswordRequired: true,
};
}
setGlobal(global);
break;
case 'authorizationStateWaitQrCode':
setGlobal({

View File

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