Sunday 29 September 2019

Hanlde JWT expiration and re-trigger unauthorized axios call using vue js and axios with node as backend

Hi there, i am building an API which uses JWT to maintain authentication for the user but i m having trouble to maintain the JWT token as most of the time ehat is happening is that i have JWT valid for 15 min and if user triggers a call to server that needs a valid JWT it fails and server returns 401 / 403 unauthorized status then i dont know how to handle that expiration time and re-trigger the call after re-authenticating the user.I am using vue-cli and axios for frontend and node js, express and jsonwebtoken for backend. ANY helpp.So almost struggle for the authentication part for evey api is create as i have no idea how to handle expiration time along with re-trigger the unauthorized call again without user having to click it again

Submitted September 29, 2019 at 07:38PM by kgoel085

No comments:

Post a Comment