File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ SESSION_EXPIRES_IN=86400
17
17
# AUTH
18
18
PASSWORD_RESET_TOKEN_EXPIRES_IN = 86400
19
19
SET_PASSWORD_TOKEN_EXPIRES_IN = 86400
20
- SET_SESSION = 0
20
+ SET_SESSION = 1
21
21
22
22
# DATABSES
23
23
REDIS_URL = " redis://localhost:6380"
Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ export const COOKIE_CONFIG: CookieOptions = {
9
9
httpOnly : true ,
10
10
sameSite : "lax" ,
11
11
secure : config . NODE_ENV === "production" ,
12
- maxAge : config . SESSION_EXPIRES_IN ,
12
+ maxAge : config . SESSION_EXPIRES_IN * 1000 ,
13
13
domain : clientSideUrl . hostname ,
14
14
} ;
Original file line number Diff line number Diff line change @@ -48,15 +48,15 @@ export const compareHash = async (
48
48
} ;
49
49
export const signToken = async ( payload : JwtPayload ) : Promise < string > => {
50
50
return sign ( payload , String ( config . JWT_SECRET ) , {
51
- expiresIn : Number ( config . JWT_EXPIRES_IN ) ,
51
+ expiresIn : Number ( config . JWT_EXPIRES_IN ) * 1000 ,
52
52
} ) ;
53
53
} ;
54
54
55
55
export const signPasswordResetToken = async (
56
56
payload : PasswordResetTokenPayload ,
57
57
) => {
58
58
return sign ( payload , String ( config . JWT_SECRET ) , {
59
- expiresIn : config . PASSWORD_RESET_TOKEN_EXPIRES_IN ,
59
+ expiresIn : config . PASSWORD_RESET_TOKEN_EXPIRES_IN * 1000 ,
60
60
} ) ;
61
61
} ;
62
62
You can’t perform that action at this time.
0 commit comments