spring-social-google icon indicating copy to clipboard operation
spring-social-google copied to clipboard

unable to fetch email address on already established connection

Open tveimo opened this issue 9 years ago • 3 comments

When a user logs in through Spring social with google, we see the email address coming through ok. If we fetch user data through an established connection, we get no email address neither using

connection.fetchUserProfile().getEmail() connection.getApi().plusOperations().getGoogleProfile().getAccountEmail() or .getEmailAddresses()

Am wondering if this could be related to the scope not being set properly? We do set the scope both in the login form, and on the connection factory.

GoogleConnectionFactory gcFactory = new GoogleConnectionFactory( environment.getProperty("google.clientId"), environment.getProperty("google.clientSecret")); gcFactory.setScope(environment.getProperty("google.clientScope"));

I have tried both "profile", "email" and "profile,email" for the value of the google.clientScope property.

tveimo avatar Sep 03 '15 07:09 tveimo

Check your scope settings.

lure avatar Jan 25 '16 17:01 lure

Could this issue be related to this Spring Social issue? Incrementing the Spring Social version from 1.1.0.RELEASE to 1.1.1.RELEASE could rectify.

griffinjm avatar Dec 14 '16 23:12 griffinjm

Have you ever fixed this ?

mihajul avatar Oct 22 '19 12:10 mihajul