Include email in user information attributes from Facebook

Fixes gh-5532
This commit is contained in:
Jonathan Chen 2018-07-18 09:07:34 +12:00 committed by Joe Grandja
parent 3f8e69211f
commit fbf870a82e
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ public enum CommonOAuth2Provider {
builder.scope("public_profile", "email");
builder.authorizationUri("https://www.facebook.com/v2.8/dialog/oauth");
builder.tokenUri("https://graph.facebook.com/v2.8/oauth/access_token");
builder.userInfoUri("https://graph.facebook.com/me");
builder.userInfoUri("https://graph.facebook.com/me?fields=id,name,email");
builder.userNameAttributeName("id");
builder.clientName("Facebook");
return builder;

View File

@ -89,7 +89,7 @@ public class CommonOAuth2ProviderTests {
assertThat(providerDetails.getTokenUri())
.isEqualTo("https://graph.facebook.com/v2.8/oauth/access_token");
assertThat(providerDetails.getUserInfoEndpoint().getUri())
.isEqualTo("https://graph.facebook.com/me");
.isEqualTo("https://graph.facebook.com/me?fields=id,name,email");
assertThat(providerDetails.getUserInfoEndpoint().getUserNameAttributeName())
.isEqualTo("id");
assertThat(providerDetails.getJwkSetUri()).isNull();