Revert "Remove Anthropic OAuth support"

This reverts commit f5e6bcac1b.
This commit is contained in:
Mario Zechner 2026-01-09 06:00:20 +01:00
parent f745321169
commit 19b5663340
10 changed files with 159 additions and 84 deletions

View file

@ -9,6 +9,7 @@
import {
getEnvApiKey,
getOAuthApiKey,
loginAnthropic,
loginAntigravity,
loginGeminiCli,
loginGitHubCopilot,
@ -169,6 +170,12 @@ export class AuthStorage {
let credentials: OAuthCredentials;
switch (provider) {
case "anthropic":
credentials = await loginAnthropic(
(url) => callbacks.onAuth({ url }),
() => callbacks.onPrompt({ message: "Paste the authorization code:" }),
);
break;
case "github-copilot":
credentials = await loginGitHubCopilot({
onAuth: (url, instructions) => callbacks.onAuth({ url, instructions }),