mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
removed email from login token
This commit is contained in:
parent
dbe3a96ac4
commit
67316a9f30
2 changed files with 1 additions and 20 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)}`,
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue