mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
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:
@@ -537,7 +537,10 @@ export interface ElectronAPI {
|
||||
isMac: boolean;
|
||||
isLinux: boolean;
|
||||
}>;
|
||||
verifyClaudeAuth: (authMethod?: 'cli' | 'api_key') => Promise<{
|
||||
verifyClaudeAuth: (
|
||||
authMethod?: 'cli' | 'api_key',
|
||||
apiKey?: string
|
||||
) => Promise<{
|
||||
success: boolean;
|
||||
authenticated: boolean;
|
||||
error?: string;
|
||||
@@ -1118,7 +1121,10 @@ interface SetupAPI {
|
||||
isMac: boolean;
|
||||
isLinux: boolean;
|
||||
}>;
|
||||
verifyClaudeAuth: (authMethod?: 'cli' | 'api_key') => Promise<{
|
||||
verifyClaudeAuth: (
|
||||
authMethod?: 'cli' | 'api_key',
|
||||
apiKey?: string
|
||||
) => Promise<{
|
||||
success: boolean;
|
||||
authenticated: boolean;
|
||||
error?: string;
|
||||
@@ -1208,8 +1214,12 @@ function createMockSetupAPI(): SetupAPI {
|
||||
};
|
||||
},
|
||||
|
||||
verifyClaudeAuth: async (authMethod?: 'cli' | 'api_key') => {
|
||||
console.log('[Mock] Verifying Claude auth with method:', authMethod);
|
||||
verifyClaudeAuth: async (authMethod?: 'cli' | 'api_key', apiKey?: string) => {
|
||||
console.log(
|
||||
'[Mock] Verifying Claude auth with method:',
|
||||
authMethod,
|
||||
apiKey ? '(with key)' : ''
|
||||
);
|
||||
// Mock always returns not authenticated
|
||||
return {
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user