Open m4v15 opened 6 years ago
atm:
"The default behavior is to throw an error when the token is invalid, so you can add your custom logic to manage unauthorized access as follows:
app.use(function (err, req, res, next) { if (err.name === 'UnauthorizedError') { res.status(401).send('invalid token...'); } });
"
From the jwt-express docs
If a token is expired we probably want to direct them back to the log in page, or else we should render and nicer looking unauthorized page
@m4v15 can we close?
atm:
"The default behavior is to throw an error when the token is invalid, so you can add your custom logic to manage unauthorized access as follows:
"
From the jwt-express docs
If a token is expired we probably want to direct them back to the log in page, or else we should render and nicer looking unauthorized page