mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-26 09:55:54 +03:00
[PR #185] [MERGED] feat(kiro): 添加批量导入refreshToken功能 #287
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AIClient-2-API-justlovemaki#287
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/185
Author: @leonaii
Created: 1/8/2026
Status: ✅ Merged
Merged: 1/8/2026
Merged by: @justlovemaki
Base:
main← Head:main📝 Commits (1)
4f3fc4bfeat(kiro): 添加批量导入refreshToken功能📊 Changes
4 files changed (+407 additions, -2 deletions)
View changed files
📝
src/oauth-handlers.js(+148 -0)📝
src/ui-manager.js(+41 -1)📝
static/app/i18n.js(+26 -0)📝
static/app/provider-manager.js(+192 -1)📄 Description
功能描述
在 Claude Kiro OAuth 授权方式选择对话框中新增"批量导入 refreshToken"功能,允许用户批量导入已有的 refreshToken 并自动生成凭据文件。
修改内容
后端 (src/oauth-handlers.js)
refreshKiroToken函数:通过 refreshToken 调用 Kiro API 获取 accessTokenbatchImportKiroRefreshTokens函数:支持批量处理多个 refreshToken,部分失败时继续处理其他 tokenAPI 路由 (src/ui-manager.js)
POST /api/kiro/batch-import-tokens接口端点前端 UI (static/app/provider-manager.js)
showKiroBatchImportModal模态框,支持:国际化 (static/app/i18n.js)
文件变更
src/oauth-handlers.js- 新增 token 刷新和批量导入逻辑src/ui-manager.js- 新增 API 路由static/app/provider-manager.js- 新增 UI 组件static/app/i18n.js- 新增国际化文本生成文件格式
凭据文件保存路径:
configs/kiro/{timestamp}_kiro-auth-token/{timestamp}_kiro-auth-token.json文件内容格式: