File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 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
1717# AUTH
1818PASSWORD_RESET_TOKEN_EXPIRES_IN = 86400
1919SET_PASSWORD_TOKEN_EXPIRES_IN = 86400
20- SET_SESSION = 0
20+ SET_SESSION = 1
2121
2222# DATABSES
2323REDIS_URL = " redis://localhost:6380"
Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ export const COOKIE_CONFIG: CookieOptions = {
99 httpOnly : true ,
1010 sameSite : "lax" ,
1111 secure : config . NODE_ENV === "production" ,
12- maxAge : config . SESSION_EXPIRES_IN ,
12+ maxAge : config . SESSION_EXPIRES_IN * 1000 ,
1313 domain : clientSideUrl . hostname ,
1414} ;
Original file line number Diff line number Diff line change @@ -48,15 +48,15 @@ export const compareHash = async (
4848} ;
4949export const signToken = async ( payload : JwtPayload ) : Promise < string > => {
5050 return sign ( payload , String ( config . JWT_SECRET ) , {
51- expiresIn : Number ( config . JWT_EXPIRES_IN ) ,
51+ expiresIn : Number ( config . JWT_EXPIRES_IN ) * 1000 ,
5252 } ) ;
5353} ;
5454
5555export const signPasswordResetToken = async (
5656 payload : PasswordResetTokenPayload ,
5757) => {
5858 return sign ( payload , String ( config . JWT_SECRET ) , {
59- expiresIn : config . PASSWORD_RESET_TOKEN_EXPIRES_IN ,
59+ expiresIn : config . PASSWORD_RESET_TOKEN_EXPIRES_IN * 1000 ,
6060 } ) ;
6161} ;
6262
You can’t perform that action at this time.
0 commit comments