fix(dashboard): detect popup blocked during OAuth flow

Show toast warning with manual URL copy instructions when
browser blocks OAuth popup window.
This commit is contained in:
kaitranntt
2026-02-02 23:40:48 -05:00
parent 09b5239f58
commit 441870d38e
@@ -215,9 +215,16 @@ export function AddAccountDialog({
<Button
variant="outline"
size="sm"
onClick={() =>
authFlow.authUrl && window.open(authFlow.authUrl, '_blank')
}
onClick={() => {
if (!authFlow.authUrl) return;
const popup = window.open(authFlow.authUrl, '_blank');
if (!popup || popup.closed || typeof popup.closed === 'undefined') {
toast.warning(
'Popup blocked. Copy the URL above and open it manually in your browser.',
{ duration: 5000 }
);
}
}}
>
<ExternalLink className="w-3 h-3 mr-1" />
Open