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 :: convert json string or parse 
Javascript :: how to add important tag js 
Javascript :: input clear 
Javascript :: javascript get element by id 
Javascript :: jquery onload function for div 
Javascript :: pyspark from_json example 
Javascript :: jquery add event after page load 
Javascript :: .ajax how to get data from form 
Javascript :: install ckeditor 5 for react js 
Javascript :: link stylesheet in javascript 
Javascript :: how to find largest number in array in javascript 
Javascript :: javascript find object in array 
Javascript :: boolean object js 
Javascript :: how to download express without view 
Javascript :: retrieve data from option select js 
Javascript :: getcomputedstyle 
Javascript :: change image onclick html 
Javascript :: Material-ui add alert icon 
Javascript :: protected route in react js 
Javascript :: axios post 
Javascript :: extract all link with javascript 
Javascript :: math ceil 
Javascript :: mongoose reset database 
Javascript :: http to https express js 
Javascript :: Remove Duplicates array values in javascript 
Javascript :: react form submit values with name 
Javascript :: set default date today js 
Javascript :: import svg react 
Javascript :: inheritance in es6 
Javascript :: jqueyr element is hide 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =