1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00
Files
server/api/src/utils/generateAuthCode.ts
2022-07-03 06:56:18 +05:00

8 lines
197 B
TypeScript

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