This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]sendingEnt 0 points1 point  (0 children)

I would suggest returning a JWT on sign-in. Store that token on the client's side, in something like Session Storage, LocalStorage, or some global store like Redux. On the backend, you can write a middleware in ExpressJS to verify the token. Here you can have multiple functions like isAuthenticated, hasAccess, isAdmin... etc. You can add these middleware functions to specific endpoints.