File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,7 +153,10 @@ export const getProviders = async () => {
153153 return providers ;
154154}
155155
156- const nextAuthResult = NextAuth ( {
156+ // @note we use lazy initialization here to ensure that the
157+ // `providers` property is upto date with any config changes.
158+ // @see https://authjs.dev/reference/nextjs#lazy-initialization
159+ const nextAuthResult = NextAuth ( async ( ) => ( {
157160 secret : env . AUTH_SECRET ,
158161 adapter : EncryptedPrismaAdapter ( __unsafePrisma ) ,
159162 session : {
@@ -401,10 +404,10 @@ const nextAuthResult = NextAuth({
401404 providers : ( await getProviders ( ) ) . map ( ( provider ) => provider . provider ) ,
402405 pages : {
403406 signIn : "/login" ,
404- // We set redirect to false in signInOptions so we can pass the email is as a param
407+ // We set redirect to false in signInOptions so we can pass the email in as a param
405408 // verifyRequest: "/login/verify",
406409 }
407- } ) ;
410+ } ) ) ;
408411
409412export const { handlers, signIn, signOut } = nextAuthResult ;
410413
You can’t perform that action at this time.
0 commit comments