mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 19:34:34 +00:00
8 lines
210 B
TypeScript
8 lines
210 B
TypeScript
import jwt from 'jsonwebtoken'
|
|
import { InfoJWT } from '../types'
|
|
|
|
export const generateAccessToken = (data: InfoJWT) =>
|
|
jwt.sign(data, process.env.ACCESS_TOKEN_SECRET as string, {
|
|
expiresIn: '1day'
|
|
})
|