fix google oauth

This commit is contained in:
paisley
2026-03-08 11:03:34 +08:00
parent 807df95e92
commit 38e8449ea2
14 changed files with 1125 additions and 89 deletions

View File

@@ -24,6 +24,7 @@ import { ensureBuiltinSkillsInstalled } from '../utils/skill-config';
import { startHostApiServer } from '../api/server';
import { HostEventBus } from '../api/event-bus';
import { deviceOAuthManager } from '../utils/device-oauth';
import { browserOAuthManager } from '../utils/browser-oauth';
import { whatsAppLoginManager } from '../utils/whatsapp-login';
// Disable GPU hardware acceleration globally for maximum stability across
@@ -277,6 +278,18 @@ async function initialize(): Promise<void> {
hostEventBus.emit('oauth:error', error);
});
browserOAuthManager.on('oauth:start', (payload) => {
hostEventBus.emit('oauth:start', payload);
});
browserOAuthManager.on('oauth:success', (payload) => {
hostEventBus.emit('oauth:success', { ...payload, success: true });
});
browserOAuthManager.on('oauth:error', (error) => {
hostEventBus.emit('oauth:error', error);
});
whatsAppLoginManager.on('qr', (data) => {
hostEventBus.emit('channel:whatsapp-qr', data);
});