mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-28 21:57:23 +02:00
🐛 Fix magic link consumed before user gets it (#909)
* 🐛 Fix magic link consumed before user gets it
* Improve abstraction
* Remove extra comment
This commit is contained in:
parent
ac1d844b7a
commit
d95d648012
2 changed files with 40 additions and 2 deletions
|
@ -1,4 +1,3 @@
|
|||
import { PrismaAdapter } from "@auth/prisma-adapter";
|
||||
import { RegistrationTokenPayload } from "@rallly/backend";
|
||||
import { decryptToken } from "@rallly/backend/session";
|
||||
import { generateOtp, randomid } from "@rallly/backend/utils/nanoid";
|
||||
|
@ -17,13 +16,14 @@ import NextAuth, {
|
|||
import CredentialsProvider from "next-auth/providers/credentials";
|
||||
import EmailProvider from "next-auth/providers/email";
|
||||
|
||||
import { CustomPrismaAdapter } from "@/utils/auth/custom-prisma-adapter";
|
||||
import { LegacyTokenProvider } from "@/utils/auth/legacy-token-provider";
|
||||
import { mergeGuestsIntoUser } from "@/utils/auth/merge-user";
|
||||
import { emailClient } from "@/utils/emails";
|
||||
|
||||
const getAuthOptions = (...args: GetServerSessionParams) =>
|
||||
({
|
||||
adapter: PrismaAdapter(prisma),
|
||||
adapter: CustomPrismaAdapter(prisma),
|
||||
secret: process.env.SECRET_PASSWORD,
|
||||
session: {
|
||||
strategy: "jwt",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue