Answer the question
In order to leave comments, you need to log in
How to implement authorization in nodejs for Rest Api?
Good time of the day. How to properly organize an authorization system for a self-written REST Api? I would like it to be easy and reliable :) I store the data in mongodb, but it can be stored elsewhere, since at the initial stage there will be no more than 20 users
Answer the question
In order to leave comments, you need to log in
Thanks for the hint, I already stumbled upon the passport myself :) but now I'm tormented by another question. Is it possible to separate authorization in api and backend? Or do you need one model to work for all routes?
how I imagine it
/api/auth (token based auth)
/backend/auth (user pass) (aka system admin panel)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question