Spring Oauth password grant with FB login

狂风中的少年 提交于 2019-12-25 03:26:42

问题


I've a Spring backend with Spring OAuth2 and Angularjs client.

Plain username/password password grant is no brainer. But what happens when I want the user also to be able to login with another oauth provider such as FB.

I imagine the following flow:

  1. First retrieve FB access token from the angular client.
  2. Post that token somehow as a password grant request to the spring endpoint
  3. From backend fetch userId using the token from FB.
  4. Find user with same fb userId. If found create securityContext for the user.

I assume this should be possible if I could tweak Spring Oauth a little. What classes should I look for extending and configuring?

来源:https://stackoverflow.com/questions/24925302/spring-oauth-password-grant-with-fb-login

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!