File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ import Google from "next-auth/providers/google";
8
8
import GitHub from "next-auth/providers/github" ;
9
9
import { join } from "path" ;
10
10
import NextAuth from "next-auth" ;
11
- import { encode } from "next-auth/jwt" ;
12
- import { cookies } from "next/headers" ;
13
11
import { readdir } from "fs/promises" ;
14
12
import Credentials from "next-auth/providers/credentials" ;
15
13
import { existsSync } from "fs" ;
@@ -21,17 +19,16 @@ import { logger } from "./pino";
21
19
import sendVerificationRequest from "./node-mailer" ;
22
20
23
21
export const { handlers, auth, signIn, signOut } = NextAuth ( ( ) => ( {
24
- jwt : {
25
- encode : async ( params ) => cookies ( ) . get ( "authjs.session-token" ) ?. value ?? encode ( params )
26
- } ,
27
22
pages : {
28
23
error : "/" ,
29
24
signIn : "/authentication" ,
30
25
signOut : "/" ,
31
26
verifyRequest : "/authentication?error=ValidationRequired"
32
27
} ,
33
28
adapter : PrismaAdapter ( prisma ) as Adapter , // https://github.com/nextauthjs/next-auth/issues/9493#issuecomment-1871601543
34
- strategy : "jwt" ,
29
+ session : {
30
+ strategy : "jwt"
31
+ } ,
35
32
basePath : `${ process . env . __NEXT_ROUTER_BASEPATH } /api/user/auth` ,
36
33
trustHost : true ,
37
34
callbacks : {
You can’t perform that action at this time.
0 commit comments