refactor: remove CLAUDE_CODE_OAUTH_TOKEN references and update authentication to use ANTHROPIC_API_KEY exclusively

This commit is contained in:
Cody Seibert
2025-12-15 14:33:58 -05:00
parent 54b977ee1b
commit d42857ec26
13 changed files with 21 additions and 88 deletions

View File

@@ -33,25 +33,15 @@ cd automaker
npm install
```
**Step 3:** Get your Claude subscription token:
**Step 3:** Set your Anthropic API key (optional - you can also enter it in the app's setup wizard):
```bash
claude setup-token
export ANTHROPIC_API_KEY="sk-ant-..."
```
This command will authenticate you via your browser and print a token to your terminal.
Alternatively, you can enter your API key directly in the Automaker setup wizard when you launch the app.
> **⚠️ Warning:** This command will print your token to your terminal. Be careful if you're streaming or sharing your screen, as the token will be visible to anyone watching.
**Step 4:** Export the Claude Code OAuth token in your shell (optional - you can also enter it in the app's setup wizard):
```bash
export CLAUDE_CODE_OAUTH_TOKEN="your-token-here"
```
Alternatively, you can enter your token directly in the Automaker setup wizard when you launch the app.
**Step 5:** Start the development server:
**Step 4:** Start the development server:
```bash
npm run dev:electron

View File

@@ -2,9 +2,6 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "export",
env: {
CLAUDE_CODE_OAUTH_TOKEN: process.env.CLAUDE_CODE_OAUTH_TOKEN || "",
},
};
export default nextConfig;

View File

@@ -11,7 +11,7 @@ export async function POST(request: NextRequest) {
const { apiKey } = await request.json();
// Use provided API key or fall back to environment variable
const effectiveApiKey = apiKey || process.env.ANTHROPIC_API_KEY || process.env.CLAUDE_CODE_OAUTH_TOKEN;
const effectiveApiKey = apiKey || process.env.ANTHROPIC_API_KEY;
if (!effectiveApiKey) {
return NextResponse.json(

View File

@@ -55,9 +55,7 @@ export function AuthenticationStatusDisplay({
<div className="flex items-center gap-2 text-muted-foreground">
<Info className="w-3 h-3 shrink-0" />
<span>
{claudeAuthStatus.method === "oauth_token_env"
? "Using CLAUDE_CODE_OAUTH_TOKEN"
: claudeAuthStatus.method === "oauth_token"
{claudeAuthStatus.method === "oauth_token"
? "Using stored OAuth token (subscription)"
: claudeAuthStatus.method === "api_key_env"
? "Using ANTHROPIC_API_KEY"