Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

JSON Web Token (JWT) set 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 return json data from mvc controller to view 
Javascript :: jquery if else click function 
Javascript :: javascript regex all matches match 
Javascript :: Reactjs function exemple useEffect 
Javascript :: deep copy javascript 
Javascript :: javascript new date undefined 
Javascript :: javascript fetch 
Javascript :: autocannon 
Javascript :: find match in array object js 
Javascript :: count length of a string javascript 
Javascript :: filter object array 
Javascript :: discord js embed footer 
Javascript :: best javascript books 
Javascript :: Math max with array js 
Javascript :: pure component 
Javascript :: array.contains javascript 
Javascript :: e.target.value to image url in javascript 
Javascript :: how to give path of file which in directory in require_once 
Javascript :: foreach in the elements with a data attibute jquery 
Javascript :: how javascript interpreter works 
Javascript :: defining functions in react 
Javascript :: how to mark a icon with vector icons in mapview 
Javascript :: alpine js update data 
Javascript :: JQuery Autocomplete no result found 
Javascript :: switch case statement in javascript 
Javascript :: regex validate wallet eth 
Javascript :: text animation css and js 
Javascript :: mongodb populate 
Javascript :: angular http post example 
Javascript :: how to join kak in javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =