From 3240e19710df944ca3d4ba60981536ecc5012f9b Mon Sep 17 00:00:00 2001 From: diced Date: Sat, 6 Sep 2025 12:51:46 -0700 Subject: [PATCH] fix: bypass local login #878 --- src/client/pages/auth/login.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/pages/auth/login.tsx b/src/client/pages/auth/login.tsx index a39d33b2..57ad60cd 100644 --- a/src/client/pages/auth/login.tsx +++ b/src/client/pages/auth/login.tsx @@ -32,7 +32,7 @@ import { IconX, } from '@tabler/icons-react'; import { useEffect, useState } from 'react'; -import { Link, redirect, useLocation, useNavigate } from 'react-router-dom'; +import { Link, useLocation, useNavigate } from 'react-router-dom'; import useSWR from 'swr'; import GenericError from '../../error/GenericError'; import { useTitle } from '@/lib/hooks/useTitle'; @@ -157,13 +157,14 @@ export default function Login() { }, [user]); useEffect(() => { + console.log({ willRedirect, config }); if (willRedirect && config) { const provider = Object.keys(config.oauthEnabled).find( (x) => config.oauthEnabled[x as keyof typeof config.oauthEnabled] === true, ); if (provider) { - redirect(`/api/auth/oauth/${provider.toLowerCase()}`); + window.location.href = `/api/auth/oauth/${provider.toLowerCase()}`; } } }, [willRedirect, config]);