feat(auth) : improve Google account handling

This commit is contained in:
2026-10-12 00:51:29 +07:00 Unverified
parent e2af59292c
commit fdbabecf56
7 changed files with 80 additions and 11 deletions
@@ -0,0 +1,18 @@
"use client";
import { useEffect } from "react";
import { useRouter, useSearchParams } from "next/navigation";
export function AccountLinkErrorRedirect() {
const router = useRouter();
const searchParams = useSearchParams();
const error = searchParams.get("error");
useEffect(() => {
if (error === "account_not_linked") {
router.replace("/auth/login?error=account_not_linked");
}
}, [error, router]);
return null;
}