spring-guides / tut-spring-boot-oauth2

Spring Boot and OAuth2:: A tutorial on "social" login and single sign on with Facebook and Github

Home Page:https://spring.io/guides/tutorials/spring-boot-oauth2/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get an access token from the Spring Authorization Server based on Identity Provider token?

alhezmi72 opened this issue · comments

I tried to get an access token from the spring authorization server using the Identity Provider token (e.g. facebook) as the result of successful authentication, but I always receive 401 error message. Could anyone give an example similar to the given curl example in the tutorial "curl acme:acmesecret@localhost:8080/oauth/token -d grant_type=password ..."? The later example works fine using the user/password credential.

There’s no standard protocol for that (token exchange). What you need is to be authenticated with the auth server and use its cookies. Please ask on stack overflow for help (this is not an issue with the guide).