strongloop / loopback-component-oauth2

oAuth 2.0 server for LoopBack
http://www.strongloop.com
Other
62 stars 63 forks source link

Need example using loopback-component-passport #14

Closed JonnyBGod closed 8 years ago

JonnyBGod commented 9 years ago

I have been trying to implement this component with the previously working login setup I had using component-passport.

At the moment I am stuck with the routes. I mean, when I protect '/api' with oauth2 all api routes become authenticated only which mean routes like '/api/users/login' or POST '/api/users' will return 401 Unauthorized.

A full example is much needed.

raymondfeng commented 9 years ago

Have you checked out https://github.com/strongloop/loopback-gateway?

JonnyBGod commented 9 years ago

I did and the jwt authentications works fine. The problem is when trying to support google, facebook or even the angularjs User.login() flow is broken.

loay commented 8 years ago

Hi @JonnyBGod Here is a full example: https://github.com/strongloop/loopback-example-passport Please let me know if you have any questions. Regards,