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
+5 -2
View File
@@ -5,7 +5,10 @@ export const instant = false;
export default async function LoginPage({ searchParams }: PageProps<"/auth/login">) {
await connection();
const { next, verified, error } = await searchParams;
const { next, verified, error, googleError } = await searchParams;
const accountNotLinkedError = error === "account_not_linked";
const googleSignInError = googleError === "1" && !accountNotLinkedError;
return <AccountPage mode="login" next={next} verified={verified === "1" && !error}
verificationError={typeof error === "string"} />;
verificationError={typeof error === "string" && !accountNotLinkedError && !googleSignInError}
accountNotLinkedError={accountNotLinkedError} googleSignInError={googleSignInError} />;
}