1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-11 03:34:35 +00:00
Files
server/api/src/utils/generateAuthCode.ts
2021-11-11 03:40:57 +05:00

8 lines
203 B
TypeScript

import jwt from 'jsonwebtoken'
import { InfoJWT } from '../types'
export const generateAuthCode = (data: InfoJWT) =>
jwt.sign(data, process.env.AUTH_CODE_SECRET as string, {
expiresIn: '30s'
})