docs: note current auth routing

This commit is contained in:
2026-01-08 16:30:03 +08:00
parent 1f130213d1
commit b6c661fb3d
2 changed files with 9 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
### 1.1 约定
- 当前实现使用 `/v1``/super/v1`,多租户前缀待统一改造
- 租户前缀:`/t/:tenant_code/`(不区分大小写;服务端统一按 `lower()` 识别)
- API`/t/:tenant_code/v1/...`
- Admin SPA`/t/:tenant_code/admin/...`
@@ -54,11 +55,13 @@
### 4.2 API baseURL 与 Cookie
- axios `baseURL = "/t/<tenant_code>/v1"`
- `withCredentials = true`携带 cookie 会话
- `withCredentials = true`历史 WeChat 方案
- 当前实现改为 JWT`Authorization: Bearer <token>`
### 4.3 未登录跳转
- 401 时跳:`/t/<tenant_code>/v1/auth/wechat?redirect=<encodeURIComponent(currentUrl)>`
- 当前实现为 OTP 登录,不走微信授权回调
---
@@ -77,4 +80,3 @@
- 统一格式:`quyun/<tenant_uuid>/<md5>.<ext>`
- `tenant_uuid` 来自 `tenants.tenant_uuid`
- `md5` 来自上传文件内容 hash