I am stuck on securing an API built with serverless Node functions using Zeit Now (https://zeit.co/docs/builders/#official-builders/node-js)
I have already implemented authentication in a React front end but now I wanna make sure that the api routes are protected so that when a user logs into the Single Page App, he gets a bearer token that lets him query only his data.
I imagine I have to
1- get the bearer token from React (not sure how since the
react-auth0-wrapper.js does not seem to have it…
2- create an API in auth0 dashboard, then import the jsonwebtoken npm library in my serverless functions. (?)
I saw that most of the tutorials you have cover ExpressJS in a server environment, so not sure how to approach this with nodeJS serverless functions.
Thank you so much.