Firebase authentication problem

I am using google sign in method in my app with the firebase.all is good but its giving null value for phone number.

I think that you have not added google json file or it’s name is not Google JSON file.

I mean that the file’s name is renamed to​:point_down:

Phone number is personal thing that Google will not provide it through login. That’s totally depends on the user.

By default phone number privacy is private. If a user set his phone number privacy to Public from his Google account settings then only you can get it otherwise you can’t.


Yes it is correct :relaxed:

And please tell us that which one of our ideas are working

@Power_Dev :point_down:


@The_K_Studio :point_down:

Thanks @The_K_Studio

If user added the mobile number during opening of gmail then we get the phone number?

Everyone adds their phone number to their Google account as security option but main thing is its privacy.

You can’t get user phone number if that user has set its privacy as private.

It’s better to ask the user to enter their phone number after Google login success. Or you can also use OTP verification method as well.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.