From 13eefdd50c2c2a151532460d1426766bbb88748a Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 7 Dec 2025 00:06:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=B8=A9=E7=83=AD=E4=B8=80?= =?UTF-8?q?=E4=B8=8B=E8=BA=AB=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/getClient.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/getClient.ts b/client/getClient.ts index 75cd98a..fae8721 100644 --- a/client/getClient.ts +++ b/client/getClient.ts @@ -1,7 +1,8 @@ import { LingChairClient } from 'lingchair-client-protocol' -import data from "./Data.ts" +import data from "./data.ts" import { UAParser } from 'ua-parser-js' import { randomUUID } from 'lingchair-internal-shared' +import performAuth from './performAuth.ts' if (!data.device_id) { const ua = new UAParser(navigator.userAgent) @@ -12,6 +13,11 @@ const client = new LingChairClient({ device_id: data.device_id, auto_fresh_token: true, }) +try { + await performAuth({}) +} catch (_) { + console.log(_) +} export default function getClient() { return client