diff --git a/frontend/src/pages/LoginPage.tsx b/frontend/src/pages/LoginPage.tsx index b53fecb..69d2bdf 100644 --- a/frontend/src/pages/LoginPage.tsx +++ b/frontend/src/pages/LoginPage.tsx @@ -24,18 +24,10 @@ export default function LoginPage() { const [error, setError] = useState(null); const [oauthLoading, setOauthLoading] = useState(null); - async function handleOAuth(providerId: string) { + function handleOAuth(providerId: string) { if (oauthLoading) return; setOauthLoading(providerId); - try { - const res = await fetch(`${base}/api/v1/oauth/${providerId}?redirectUrl=${redirectUrl}`); - const data = await res.json() as { success: boolean; data?: { authUrl?: string } }; - if (data.data?.authUrl) { - window.location.href = data.data.authUrl; - } - } catch { - setOauthLoading(null); - } + window.location.href = `${base}/api/v1/oauth/${providerId}?redirectUrl=${redirectUrl}`; } async function handleSubmit(e: React.FormEvent) {