Monday, 15 May 2017

Authentication in Express Middleware

I'm a little new to this, so excuse me if I'm over-explaining. I have REST API made with Node.js and Express.js. Some routes have authentication middleware. To use those routes, a header has to be set with the user's auth token which gets verified. I have been doing this with no problem with static sites using local storage. I'm making my first dynamic site now (using Express) and for certain routes I have middleware that loads all the data I need to display the page. How do I access and use auth tokens now that I don't have local storage's help?



via S_Farsai

No comments:

Post a Comment