Fix auth login redirect loop

This commit is contained in:
2569718930@qq.com
2026-06-14 02:20:20 +08:00
parent f071ac504d
commit 00da22e594
2 changed files with 28 additions and 14 deletions
-14
View File
@@ -169,20 +169,6 @@ export function LoginClient({ nextPath, initialError, initialMode }: LoginClient
}
};
useEffect(() => {
if (!supabaseReady) return;
const run = async () => {
const supabase = getSupabaseBrowserClient();
const {
data: { session },
} = await supabase.auth.getSession();
if (session?.user) {
router.replace(nextPath);
}
};
void run();
}, [nextPath, router, supabaseReady]);
const onGoogleSignIn = async () => {
setErrorText("");
setInfoText("");