I am trying to figure out the best way to use a token based authentication for my project.
I'm using multiple, seperate LoopBack services and I want to use the tokens to grant access to different endpoints.
Here's what I'm thinking:
- The user logs in using the User-Service (an independent LoopBack project)
- The User-Service returns a token.
- The user can then use this token to make authenticated requests to my other independent LoopBack services.
I'm using PostgreSQL and I can register a new user and log in using my User-Service (Loopback project). By logging in I get a token of course.
I'm just beginning to learn LoopBack, how could I go on about this, that is, using this token from the User-Service to authenticate the user on other separate LoopBack services?