mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
fix: add API key header to verifySession for Electron auth
The verifySession() function was not including the X-API-Key header when making requests to /api/settings/status, causing Electron mode to fail authentication on app startup despite having a valid API key. This resulted in users seeing "You've been logged out" screen immediately after launching the Electron app. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -374,7 +374,13 @@ export const verifySession = async (): Promise<boolean> => {
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
|
||||
// Add session token header if available
|
||||
// Electron mode: use API key header
|
||||
const apiKey = getApiKey();
|
||||
if (apiKey) {
|
||||
headers['X-API-Key'] = apiKey;
|
||||
}
|
||||
|
||||
// Add session token header if available (web mode)
|
||||
const sessionToken = getSessionToken();
|
||||
if (sessionToken) {
|
||||
headers['X-Session-Token'] = sessionToken;
|
||||
|
||||
Reference in New Issue
Block a user