Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-12-27 23:23:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b0e32bf63fd2e44e2a99f8de17dabeddb5ec8411
b0e32bf6
1 parent
7fb007de
docs(auth_user_info): 添加关于多供应商扩展方案的注释
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
src/utils/auth_user_info.js
src/utils/auth_user_info.js
View file @
b0e32bf
...
...
@@ -45,6 +45,12 @@ const safeParse = (text) => {
}
/**
* 如果你后续要支持“多个外部供应商”,推荐的扩展方式是:
* 在 auth_user_info.js 里把 user_info 结构升级为 { provider, credential } 或者分 key 存(如 user_info_vendorA / user_info_vendorB ),
* 然后让 getAuthHeadersFromUserInfo() 根据 provider 生成不同头——这样全项目只有一个地方需要知道供应商差异。
*/
/**
* 从存储中获取用户信息
* @param {*} options 选项对象,包含 storage 字段
* @returns 如果用户信息存在且有效,则返回用户信息对象;否则返回 null
...
...
Please
register
or
login
to post a comment