mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 19:34:34 +00:00
8 lines
197 B
TypeScript
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'
|
|
})
|