DEV Community

Discussion on: Node.js API Authentication with JWT (Json Web Token) - Auth Middleware

Collapse
 
ahmedoooov profile image
Ahmedoooov

How do you redirect to login page in the authentication middleware when the token is no longer valid, I mean instead of just sending status code 403, I want to redirect the user to login page.