From 6e3ba38df6b5b7e96cf525452cecd15f953626a5 Mon Sep 17 00:00:00 2001 From: Naiyuan Qing <145280634+NevilleQingNY@users.noreply.github.com> Date: Fri, 13 Feb 2026 12:39:16 +0800 Subject: [PATCH] docs(auth): clarify storage location for SID and user data Co-Authored-By: Claude Opus 4.5 --- docs/auth/desktop-integration.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/auth/desktop-integration.md b/docs/auth/desktop-integration.md index a6a7faac..ec7b669c 100644 --- a/docs/auth/desktop-integration.md +++ b/docs/auth/desktop-integration.md @@ -23,7 +23,7 @@ Desktop 保存到 ~/.super-multica/auth.json ### Web 端 - 端口:**3000** -- 登录 API:`/api/v1/auth/login`(通过 Next.js rewrites 代理到后端) +- 登录 API:`/api/v1/auth/login`(通过 devd 代理到后端) - 登录成功后回调:`http://127.0.0.1:{port}/callback?sid=xxx&user=xxx` ### Desktop 端 @@ -33,21 +33,23 @@ Desktop 保存到 ~/.super-multica/auth.json ## 存储 -``` -~/.super-multica/auth.json -``` +**路径:** `~/.super-multica/auth.json` + +Desktop 登录成功后,SID 和用户信息存储在本地文件: ```json { - "sid": "xxx", + "sid": "session-id-from-backend", "user": { - "uid": "xxx", - "name": "xxx", - "email": "xxx" + "uid": "user-id", + "name": "User Name", + "email": "user@example.com" } } ``` +后续请求可从此文件读取 `sid` 进行认证。 + ## 退出登录 **后端只需要返回错误,前端会自动处理退出。**