Expose explicit Google Auth Popup error message and domain validation status
This commit is contained in:
@@ -127,16 +127,16 @@ export const GoogleWorkspaceHub: React.FC<GoogleWorkspaceHubProps> = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} 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 = () => {
|
const handleApplyCustomToken = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user