1

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:

  1. The user logs in using the User-Service (an independent LoopBack project)
  2. The User-Service returns a token.
  3. 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?

atax1c
  • 69
  • 4
  • Hmm... why separate LoopBack instances? Did you know that you can connect multiple data backends through a single LB gateway? I don't know of any way to "share" the tokens across applications. – Jordan Kasper Mar 11 '15 at 21:39

0 Answers0