How to get phone number from Google Sign in

Viewed 77

So its my first time using Google Sign In.

I used this to integrate Google Sign in in my website: https://developers.google.com/identity/sign-in/web/sign-in

And so far i'm only getting basic stuff like the name and email address of the user.

So how do I also get the user's phone number?

here is the js function that gets called after signing in:

function onSignIn(googleUser) {
  var profile = googleUser.getBasicProfile();
  console.log('ID: ' + profile.getId()); 
  console.log('Name: ' + profile.getName());
  console.log('Image URL: ' + profile.getImageUrl());
  console.log('Email: ' + profile.getEmail()); 
}


0 Answers
Related