我试着用回收站作为API来实现facebook登录,
遵循http://loopback.io/doc/en/lb3/Tutorial-third-party-login.html和https://github.com/strongloop/loopback-example-passport,我无法将教程应用到我的案例中,因为在示例中,客户端和服务器端位于同一个项目上。
我的应用程序:
- example endpoint: www.myapp.com
- User click login by facebook button to get access\_token after that send to API.
- example endpoint: www.api-myapp.com
- API get access\_token from client then fetch data from facebook graph API.
- If email is existed then auto-login and return token to the client.
- Else register a new user and return token to the client.
从下面的流程中,我无法通过使用Loopback来实现这个流:(在正常情况下,我可以通过用户名和密码注册/登录,但我混淆了通过facebook登录注册/登录)。
发布于 2018-05-03 15:10:37
使用回收站可以很容易地实现这种行为。假设您正在跟踪第三方登录文档,您只需:
facebook-passport身份验证。authpath (即http://<api-server>/auth/facebook)。successRedirect设置为http://<app-server>/<post-login-url>。https://stackoverflow.com/questions/50144389
复制相似问题