Hello! I enabled social sign up with Google and Microsoft, but I am not able to access first and last name in user_metadata. Here’s what I’m trying:
lock.getUserInfo(authResult.accessToken, function(error, profile) {
if (!error) {
console.log(profile);
}
});
I get the following
{
sub: "google-oauth2|xxx",
email: "xxx@gmail.com",
email_verified: true
}
and if I try to use a rule to add a new property to user.user_metadata
I get ‘Wrong credentials’ error. There’s another rule that adds user_metadata
to a idTokenPayload
property which contains first and last name ( the lock includes email, password, first and last name), but it’s only added when I sign up with username and password. Is there a way to get first and last name from social providers?