Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
298 B
2
Indexable
Never
import jwt from 'jsonwebtoken';

export function validateInput(input) {
    if (input.trim() === '') {
      return true;
    }
    return false;
}


const generateJWT = token => {
    return jwt.sign({token}, process.env.JWT_SECRET, {
        expiresIn: '5h'
    });
}

export default generateJWT;