From ab07f26dcb2f06559c9101cac60a2c5a8ad0bc8e Mon Sep 17 00:00:00 2001 From: str1k3r <115313679+S1l3ntStr1ke87@users.noreply.github.com> Date: Tue, 18 Aug 2026 15:41:31 -0400 Subject: [PATCH] fix(lceonline): being logged out every app open --- src/services/LceOnlineService.ts | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/services/LceOnlineService.ts b/src/services/LceOnlineService.ts index 60d6ba7..42f44f1 100644 --- a/src/services/LceOnlineService.ts +++ b/src/services/LceOnlineService.ts @@ -36,9 +36,6 @@ export class LceOnlineService { private _listeners: Array<() => void> = []; constructor() { this.loadSession(); - if (this._session) { - this.refreshToken(); - } } onSessionChange(listener: () => void): () => void { @@ -211,28 +208,6 @@ export class LceOnlineService { return data; } - async refreshToken(): Promise { - if (!this._session) return false; - - try { - const res = await this.request("POST", "/refreshtoken", null, AUTH_BASE_URL); - if (typeof res === "string" && res.startsWith("-")) { - const [username, token] = res.slice(1).split(":"); - this._session.accessToken = token; - this._session.account = { username, displayName: username }; - this.saveSession(); - this._notify(); - return true; - } - this.logoutLocal(); - return false; - } catch (e) { - console.warn("Failed to refresh token", e); - this.logoutLocal() - return false; - } - } - async getSocialLists() { const res = await this.request("GET", "/getSocialLists", null); if (typeof res === "string") throw new Error(res);