mirror of
https://github.com/sasjs/server.git
synced 2026-01-06 14:10:06 +00:00
fix: updated token expiry times
This commit is contained in:
@@ -3,5 +3,5 @@ import { InfoJWT } from '../types'
|
|||||||
|
|
||||||
export const generateAccessToken = (data: InfoJWT) =>
|
export const generateAccessToken = (data: InfoJWT) =>
|
||||||
jwt.sign(data, process.env.ACCESS_TOKEN_SECRET as string, {
|
jwt.sign(data, process.env.ACCESS_TOKEN_SECRET as string, {
|
||||||
expiresIn: '1h'
|
expiresIn: '1day'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ import { InfoJWT } from '../types'
|
|||||||
|
|
||||||
export const generateRefreshToken = (data: InfoJWT) =>
|
export const generateRefreshToken = (data: InfoJWT) =>
|
||||||
jwt.sign(data, process.env.REFRESH_TOKEN_SECRET as string, {
|
jwt.sign(data, process.env.REFRESH_TOKEN_SECRET as string, {
|
||||||
expiresIn: '1day'
|
expiresIn: '30 days'
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user