0

I am implementing Google sign-in method to my app, but the app also requires a username just like social media. so should I give an add username option on the next screen when the user registers through google or is there any other method also to add the username option also in the app?

Alex Mamo
  • 130,605
  • 17
  • 163
  • 193

1 Answers1

1

When you sign in to Firebase with the Google provider, the FirebaseUser object already contains the user name. You can simply read it by calling getDisplayName(). If you need "another" user name, then indeed you need a screen where you should let the user input that. Then you should get the user input and save it either in Firestore or in the Realtime Database, so you can later use it in your app's code.

Alex Mamo
  • 130,605
  • 17
  • 163
  • 193