I am building an android application with java but when I am using the google sign-in auth with firebase time I don't know that is the user is already available in firebase auth.
BECAUSE: i want that if the user is not in firebase and just sign up with google then i will show him a screen where he can enter his bio (about) and if the user is already in firebase and sign in later I will not show him that bio screen
Thanks in Advance
CodePudding user response:
It sounds like you're trying to store some profile information about your users in Firestore.
In that case, once the user is signed in, you should check if you already have a profile document for that user in the database. This is easiest if you use the ID of the user as the document ID in Firestore, for example Firebase Authentication's UID, or (if you're not using Firebase Authentication) Google's sign-in's account ID.
If the document exits, you know about the user already. If it doesn't exist, you'll want to send them to the profile screen to enter their bio.
