Expose explicit Google Auth Popup error message and domain validation status

This commit is contained in:
2026-07-22 19:45:51 -04:00
parent 8cfd7797a4
commit acec1b1938
2 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -1 +1 @@
122925
126644
+9 -9
View File
@@ -127,16 +127,16 @@ export const GoogleWorkspaceHub: React.FC<GoogleWorkspaceHubProps> = ({
return;
}
} catch (err: any) {
console.warn("Google Auth popup bypassed, activating local workspace integration mode.");
console.error("Google Auth Popup Exception:", err);
const msg = err?.message || String(err);
if (msg.includes('unauthorized-domain')) {
showToast(`Domain Error: http://localhost:3000 must be added to Firebase Console -> Authentication -> Settings -> Authorized Domains.`);
} else {
showToast(`Google Sign-In Error: ${msg}`);
}
setShowTokenInputModal(true);
return;
}
// Auto-connect with local profile credentials immediately without modal prompt
const userObj = { email: 'dkifer19@gmail.com', name: 'David Kifer' };
setIsConnected(true);
setConnectedUser(userObj);
localStorage.setItem('ai_job_portal_google_connected', 'true');
localStorage.setItem('ai_job_portal_google_user', JSON.stringify(userObj));
showToast('✓ Google Workspace connected for David Kifer (dkifer19@gmail.com)!');
};
const handleApplyCustomToken = () => {