feat: verify Google OAuth code automatically after receipt

This commit is contained in:
Draculabo committed 2026-01-21 00:37:42 +08:00
1 parent 465eb5d0a4
commit e927ac9506
3 files changed
+38 -30

No files matched your search

+3 -1
View File
@@ -20,11 +20,13 @@ export class AuthServer {
const error = url.searchParams.get('error');
if (code) {
logger.info('AuthServer: Received authorization code');
logger.info(`AuthServer: Received authorization code: ${code.substring(0, 10)}...`);
// Send code to renderer
if (ipcContext.mainWindow) {
logger.info('AuthServer: Sending code to renderer via IPC');
ipcContext.mainWindow.webContents.send('GOOGLE_AUTH_CODE', code);
logger.info('AuthServer: Code sent successfully');
} else {
logger.error('AuthServer: Main window not found, cannot send code');
}