feat: 添加刷新令牌支持

* 服务端: 添加对应的接口, 对原有令牌系统稍有修改, 添加了令牌类型
* 客户端: 自动刷新访问令牌, 登录时顺带获取刷新令牌
This commit is contained in:
CrescentLeaf
2025-10-06 17:13:23 +08:00
parent dced175d7a
commit 85477fe46e
6 changed files with 80 additions and 20 deletions

View File

@@ -35,6 +35,7 @@ export default function LoginDialog({
if (checkApiSuccessOrSncakbar(re, "登录失败")) return
data.access_token = re.data!.access_token as string
data.refresh_token = re.data!.refresh_token as string
data.apply()
location.reload()
})