-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Labels
Description
This seems a bit trivial, however, I have not used JWT with Hapi.js before. Currently I am testing my auth flow by having a user login via a form, and wrapping a cookie with a JWT back to the client. For testing purposes I'm making the token expire in 1 minute. I want to be able to redirect to the /login view if the token has expired. The default behavior for this plugin seems to be a 401 response, which makes sense but if I want to capture this and redirect, I'm not exactly sure how to do it. I've tried setting ignoreExpiration to true, but I believe validateFunc isn't responsible for redirects of any kind.
Any help would be appreciated.