fix: restore telegram mini app auth
This commit is contained in:
@@ -362,6 +362,7 @@ export function createAccountStore({
|
||||
}
|
||||
|
||||
async function logout() {
|
||||
if (telegramSdk.hasLaunchParams()) return;
|
||||
markManualLogout();
|
||||
clearToken();
|
||||
try {
|
||||
|
||||
@@ -61,11 +61,6 @@ export async function runWebappBoot({
|
||||
);
|
||||
}
|
||||
|
||||
if (isManuallyLoggedOut()) {
|
||||
showLogin();
|
||||
return;
|
||||
}
|
||||
|
||||
const widgetAuthData = readTelegramLoginWidgetAuthData();
|
||||
if (widgetAuthData && (await finalizeTelegramAuth(widgetAuthData, "auth_data"))) return;
|
||||
|
||||
@@ -78,6 +73,11 @@ export async function runWebappBoot({
|
||||
}
|
||||
}
|
||||
|
||||
if (isManuallyLoggedOut()) {
|
||||
showLogin();
|
||||
return;
|
||||
}
|
||||
|
||||
if (getToken() || getCsrfToken()) {
|
||||
try {
|
||||
await loadData();
|
||||
|
||||
Reference in New Issue
Block a user