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