From b6be09ef7c237f5db37820310be98efde3d3b717 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Thu, 25 Sep 2025 14:17:29 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=AE=A2=E6=88=B6=E7=AB=AF=E8=87=AA?= =?UTF-8?q?=E5=8B=95=E6=B7=BB=E5=8A=A0=20token=20=E5=92=8C=20device=5Fid?= =?UTF-8?q?=20=E5=88=B0=20Cookie=20=E8=A3=A1,=20=E4=BB=A5=E4=BE=BF=20HTTP?= =?UTF-8?q?=20=E8=AB=8B=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/api/Client.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/api/Client.ts b/client/api/Client.ts index 27004ab..7a5db9f 100644 --- a/client/api/Client.ts +++ b/client/api/Client.ts @@ -67,8 +67,11 @@ class Client { const re = await this.invoke("User.auth", { access_token: token }, timeout) - if (re.code == 200) + if (re.code == 200) { await this.updateCachedProfile() + document.cookie = 'token=' + token + document.cookie = 'device_id=' + data.device_id + } return re } static async updateCachedProfile() {