feat: add multi-provider OAuth support for Claude and Gemini CLI

This commit is contained in:
ciat-777
2026-03-17 13:36:44 +08:00
parent 4e3dc92083
commit d8e44eb805
53 changed files with 3618 additions and 719 deletions
+24
View File
@@ -0,0 +1,24 @@
ALTER TABLE `accounts` ADD `oauth_provider` text;
--> statement-breakpoint
ALTER TABLE `accounts` ADD `oauth_account_key` text;
--> statement-breakpoint
ALTER TABLE `accounts` ADD `oauth_project_id` text;
--> statement-breakpoint
UPDATE `accounts`
SET
`oauth_provider` = NULLIF(TRIM(json_extract(`extra_config`, '$.oauth.provider')), ''),
`oauth_account_key` = NULLIF(
TRIM(COALESCE(
json_extract(`extra_config`, '$.oauth.accountKey'),
json_extract(`extra_config`, '$.oauth.accountId')
)),
''
),
`oauth_project_id` = NULLIF(TRIM(json_extract(`extra_config`, '$.oauth.projectId')), '')
WHERE `extra_config` IS NOT NULL;
--> statement-breakpoint
CREATE INDEX `accounts_oauth_provider_idx` ON `accounts` (`oauth_provider`);
--> statement-breakpoint
CREATE INDEX `accounts_oauth_identity_idx` ON `accounts` (`oauth_provider`,`oauth_account_key`,`oauth_project_id`);
--> statement-breakpoint
CREATE UNIQUE INDEX `sites_platform_url_unique` ON `sites` (`platform`,`url`);
+7
View File
@@ -85,6 +85,13 @@
"when": 1773665311013,
"tag": "0012_account_token_value_status",
"breakpoints": true
},
{
"idx": 12,
"version": "6",
"when": 1773682200000,
"tag": "0013_oauth_multi_provider",
"breakpoints": true
}
]
}