问题
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:
- First retrieve FB access token from the angular client.
- Post that token somehow as a password grant request to the spring endpoint
- From backend fetch userId using the token from FB.
- 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