mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
fix: improve auth status display and remove verbose console logging
- Fix authentication status display in settings showing "Method: Unknown" - Add support for CLAUDE_CODE_OAUTH_TOKEN environment variable - Update ClaudeAuthStatus type to include all auth methods - Fix method mapping in use-cli-status hook - Display correct auth method labels in UI - Remove verbose console logging from: - claude-cli-detector.js - codex-cli-detector.js - agent-service.js - main.js (IPC, Security logs) - Fix TypeScript errors: - Add proper type exports for AutoModeEvent - Fix Project import paths - Add null checks for api.features - Add openExternalLink to ElectronAPI type - Add type annotation for REQUIRED_STRUCTURE - Update README with clearer getting started guide 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -233,19 +233,23 @@ function ClaudeSetupStep({
|
||||
setClaudeCliStatus(cliStatus);
|
||||
|
||||
if (result.auth) {
|
||||
const methodMap: Record<string, "oauth_token_env" | "oauth_token" | "api_key" | "api_key_env" | "none"> = {
|
||||
oauth_token_env: "oauth_token_env",
|
||||
oauth_token: "oauth_token",
|
||||
api_key: "api_key",
|
||||
api_key_env: "api_key_env",
|
||||
none: "none",
|
||||
};
|
||||
const authStatus = {
|
||||
authenticated: result.auth.authenticated,
|
||||
method: result.auth.method === "oauth_token"
|
||||
? "oauth"
|
||||
: result.auth.method?.includes("api_key")
|
||||
? "api_key"
|
||||
: "none",
|
||||
method: methodMap[result.auth.method] || "none",
|
||||
hasCredentialsFile: false,
|
||||
oauthTokenValid: result.auth.hasStoredOAuthToken,
|
||||
oauthTokenValid: result.auth.hasStoredOAuthToken || result.auth.hasEnvOAuthToken,
|
||||
apiKeyValid: result.auth.hasStoredApiKey || result.auth.hasEnvApiKey,
|
||||
hasEnvOAuthToken: result.auth.hasEnvOAuthToken,
|
||||
hasEnvApiKey: result.auth.hasEnvApiKey,
|
||||
};
|
||||
console.log("[Claude Setup] Auth Status:", authStatus);
|
||||
setClaudeAuthStatus(authStatus as any);
|
||||
setClaudeAuthStatus(authStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -355,7 +359,7 @@ function ClaudeSetupStep({
|
||||
if (result.success) {
|
||||
setClaudeAuthStatus({
|
||||
authenticated: true,
|
||||
method: "oauth",
|
||||
method: "oauth_token",
|
||||
hasCredentialsFile: false,
|
||||
oauthTokenValid: true,
|
||||
});
|
||||
@@ -433,8 +437,8 @@ function ClaudeSetupStep({
|
||||
|
||||
const getAuthMethodLabel = () => {
|
||||
if (!isAuthenticated) return null;
|
||||
if (claudeAuthStatus?.method === "oauth") return "Subscription Token";
|
||||
if (apiKeys.anthropic || claudeAuthStatus?.method === "api_key") return "API Key";
|
||||
if (claudeAuthStatus?.method === "oauth_token_env" || claudeAuthStatus?.method === "oauth_token") return "Subscription Token";
|
||||
if (apiKeys.anthropic || claudeAuthStatus?.method === "api_key" || claudeAuthStatus?.method === "api_key_env") return "API Key";
|
||||
return "Authenticated";
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user