mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-30 03:45:51 +03:00
[PR #119] [MERGED] feat: 为 claude-kiro-oauth 提供商添加 OAuth 授权生成功能(支持 Google/GitHub/AWS Builder ID) #267
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#267
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/119
Author: @Ravens2121
Created: 12/21/2025
Status: ✅ Merged
Merged: 12/21/2025
Merged by: @justlovemaki
Base:
main← Head:feature/claude-kiro-oauth📝 Commits (1)
2c29526feat: add claude-kiro-oauth provider OAuth authorization support📊 Changes
3 files changed (+585 additions, -3 deletions)
View changed files
📝
src/oauth-handlers.js(+470 -0)📝
src/ui-manager.js(+7 -1)📝
static/app/provider-manager.js(+108 -2)📄 Description
概述
为
claude-kiro-oauth提供商添加完整的 OAuth 授权生成功能,支持三种认证方式:修改文件
1.
src/oauth-handlers.js(+463 行)新增配置:
KIRO_OAUTH_CONFIG- Kiro OAuth 配置常量(端点、作用域、超时等)activeKiroServers- 活动回调服务器管理activeKiroPollingTasks- 活动轮询任务管理新增函数:
handleKiroOAuth()handleKiroSocialAuth()handleKiroBuilderIDDeviceCode()pollKiroBuilderIDToken()stopKiroPollingTask()startKiroProtocolHandler()closeKiroServer()createKiroCallbackServer()2.
src/ui-manager.js(+8 行)handleKiroOAuth函数/api/providers/{type}/generate-auth-url端点添加claude-kiro-oauth分支3.
static/app/provider-manager.js(+107 行)UI 增强:
claude-kiro-oauth添加到oauthProviders列表,显示"生成授权"按钮showKiroAuthMethodSelector()函数 - 显示认证方式选择对话框executeGenerateAuthUrl()函数 - 执行授权链接生成API 使用方式
响应示例:
凭据存储格式
保存路径:
configs/kiro/{timestamp}_oauth_creds.jsonSocial Auth (Google/GitHub):
Builder ID (AWS SSO OIDC):
与现有实现的一致性
OAUTH_PROVIDERSQWEN_OAUTH_CONFIGKIRO_OAUTH_CONFIGconfigs/gemini/configs/qwen/configs/kiro/handleGeminiCliOAuthhandleQwenOAuthhandleKiroOAuthoauth_successoauth_successoauth_success测试验证
node --check)相关文档
设计参考:基于
gemini-antigravity和openai-qwen-oauth的现有实现模式🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.