Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jwt token expire time in node js

 var token = jwt.sign({email_id:'123@gmail.com'}, "Stack", {
        expiresIn: "10h" // it will be expired after 10 hours
        //expiresIn: "20d" // it will be expired after 20 days
        //expiresIn: 120 // it will be expired after 120ms
        //expiresIn: "120s" // it will be expired after 120s
 });
Comment

how to set expire time of jwt token in node js

var token = jwt.sign({email_id:'123@gmail.com'}, "Stack", {

                        expiresIn: '24h' // expires in 24 hours

                         });
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to get which key is pressed in javascript 
Javascript :: stop submit form jquery 
Javascript :: vue config devtools 
Javascript :: vuex add multiple payload to mutation 
Javascript :: js sleep 
Javascript :: kotlin jsonobject from string 
Javascript :: append child at the top 
Javascript :: javascript cors error 
Javascript :: adding to array using reach hooks 
Javascript :: angular get current route 
Javascript :: find largest number from an array in JavaScript 
Javascript :: react native floating button 
Javascript :: stop interval js 
Javascript :: node js example 
Javascript :: javascript change css 
Javascript :: how to disable keyboard input in javascript 
Javascript :: onclick change image src javascript 
Javascript :: absolute value array javascript 
Javascript :: react private route 
Javascript :: react aos animation 
Javascript :: location of release apk in react native 
Javascript :: math floor 
Javascript :: filter out object in array using two arguments 
Javascript :: http to https redirect express js 
Javascript :: search inside array with object mongodb 
Javascript :: virtual dom explained 
Javascript :: toggle class jquery not working 
Javascript :: how to use svg in react js 
Javascript :: firebase where or 
Javascript :: react native paper text input 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =