From 0d0b4019dc67b314f808f71a7fd1b403457a394a Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Sat, 4 Apr 2026 23:59:54 -0400 Subject: [PATCH] Fix login: show link instead of popup, add code paste UI --- frontend/src/App.jsx | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 4d320ba..d376925 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -90,11 +90,11 @@ const App = () => { const response = await fetch('/api/auth/login', { method: 'POST' }); const data = await response.json(); setAuthStatus(prev => ({ ...prev, ...data })); - if (data.auth_url) { - window.open(data.auth_url, '_blank'); - } else if (data.status === 'error') { + if (data.status === 'error') { alert(data.message || 'Login failed. Check container logs.'); } + // Don't try window.open — popup blockers kill it. + // The auth_url will be shown as a clickable link in the pending state. } catch (error) { console.error('Error initiating login:', error); alert('Failed to connect to auth endpoint'); @@ -255,13 +255,18 @@ const App = () => { {authStatus?.status === 'logged_in' ? ( ● {authStatus.account || 'Logged in'} ) : authStatus?.status === 'pending' ? ( -
- setAuthCode(e.target.value)} className="header-code-input" /> - -
+
+ {authStatus.auth_url && ( + 1. Open login → + )} +
+ setAuthCode(e.target.value)} className="header-code-input" /> + +
+
) : (