Every line of 'jwt expiresin' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
37 function signJwt(payload, expiresIn) { 38 return jwt.sign(payload, secrets.jwt, { expiresIn }); 39 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
37 get tokenExpires() { 38 return this.userData.tokenExpires; 39 }
49 function createRefreshToken(userId) { 50 return jwt.sign( 51 { 52 userId, 53 type: "refresh" 54 }, 55 AUTH_SECRET, 56 { 57 expiresIn: REFRESH_TOKEN_EXPIRE_SECONDS, 58 issuer: JWT_ISSUER 59 } 60 ); 61 }