removed email from login token

This commit is contained in:
Khalim Conn-Kowlessar 2026-03-10 17:56:01 +00:00
parent dbe3a96ac4
commit 67316a9f30
2 changed files with 1 additions and 20 deletions

View file

@ -27,7 +27,7 @@ export async function MagicLinksEmail({
}
// Create a clean login link instead of the NextAuth callback
const loginUrl = `${parsed.origin}/login/${token}/${encodeURIComponent(email)}`;
const loginUrl = `${parsed.origin}/verify/${token}`;
const transport = createTransport(provider.server);

View file

@ -1,19 +0,0 @@
import { redirect } from "next/navigation";
export default async function LoginPage({
params,
}: {
params: Promise<{ token: string; email: string }>;
}) {
const { token, email } = await params;
if (!token || !email) {
redirect("/");
}
const decodedEmail = decodeURIComponent(email);
redirect(
`/api/auth/callback/email?token=${token}&email=${encodeURIComponent(decodedEmail)}`,
);
}