Monday 22 April 2019

Where to store users' JWT token in order to be reused?

I'm loving Node.Js so far. It's been only a few days since I started, and I ran into an issue of sorts.So I've created a simple register/login API, it's using jsonwebtoken. I hooked up with Mongo and it's working great, although the Authorization header needs to be set on any endpoints that are not supposed to be accessed by guests.I'm moving onto actually making an HTML form that users will be able to use, and my question is where do I store and how do I retrieve the token so I can append it on every request after the user has been logged in? Is there are a better approach to this? What are my options?Thank you!

Submitted April 22, 2019 at 09:17PM by b0zhidar

No comments:

Post a Comment