fix: Allow testing API keys without saving first

- Add optional apiKey parameter to verifyClaudeAuth endpoint
- Backend uses provided key when available, falls back to stored key
- Frontend passes current input value to test unsaved keys
- Add input validation before testing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-29 21:39:59 +01:00
parent 6c3d3aa111
commit fa23a7b8e2
4 changed files with 46 additions and 17 deletions

View File

@@ -491,12 +491,13 @@ export class HttpApiClient implements ElectronAPI {
}> => this.get('/api/setup/platform'),
verifyClaudeAuth: (
authMethod?: 'cli' | 'api_key'
authMethod?: 'cli' | 'api_key',
apiKey?: string
): Promise<{
success: boolean;
authenticated: boolean;
error?: string;
}> => this.post('/api/setup/verify-claude-auth', { authMethod }),
}> => this.post('/api/setup/verify-claude-auth', { authMethod, apiKey }),
getGhStatus: (): Promise<{
success: boolean;