To set JWT token expiry time to maximum in Node, we call the sign
method.
For instance, we write
const token = jwt.sign({ email_id: "123@gmail.com" }, "secret", {});
to call jwt.sign
to create a token with the object as the data and the 'secret'
secret.
We leave out the expiry time value to set the expiry time to the maximum value.