How to get first name and last name and birthday... from Google authentication in Flutter?

732 Views Asked by At

I want to get the First name ,last name, gender and birthdate of the current user when he signin with google. FirebaseUser object do not give me first name and last name separated, gender and birthdate. Any help.

1

There are 1 best solutions below

4
Jet.B.Pope On

Once you've signed in successfully with a google credential, you can grab any details pertaining to that user's account using the FirebaseUser object. Check out firebase's documentation on how to get and use that object. Be sure to keep in mind that the user could have those values set to null, however.

Documentation for using Flutter and FirebaseAuth: https://firebase.flutter.dev/docs/auth/overview