I am trying to make a sign in with google button using passport module of node js. I am trying to get person\'s email id, name, profile pic. I am trying to download pic to l
I had the same problem and wrote the scope in this way:
app.get('/connect/google', passport.authenticate('google', {
scope: [
'https://www.googleapis.com/auth/userinfo.profile',
'https://www.googleapis.com/auth/userinfo.email'
]
}));
And you will get the email:
function(accessToken, refreshToken, profile, done) {
console.log(profile.emails[0].value);
});
I hope this helps you.