spring-social-google
spring-social-google copied to clipboard
unable to fetch email address on already established connection
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.
Check your scope settings.
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.
Have you ever fixed this ?