I have simple method to register user from simple creating account in my app bu using
Auth.auth().createUser(withEmail: email, password: password)... & it's works well.
To set sign Up users more comfortable - i want to implement google sign in & i made it.
as Frank suggested - it's does not automatically add user data to Firestore & i should to create document for each user in Firestore method. After search a lot of documents, i have made trigger:
exports.handleNewSignups = functions.auth.user().onCreate(async user => {
const { uid, displayName, email } = user
const username = displayName;
const profileImageUrl = "1.jpg";
const keywords = username.split('');
const bio = "";
return await admin
.firestore()
.collection("users")
.doc(uid)
.set({ bio, keywords, email, profileImageUrl, uid, username })
})
And now it's create a new document when user press sign in with google in my app, great! But it's look like issue which i don't know how to solve - document this user info is creating in firestore - correct, i can see this account in authentication section in firebase, but: user in my app after signinig in with google - cannot see everything in this own account.
After that im logout with this account & trying to sign in with users email & password from google (email is correct) but i see error that password is empty or incorrect. I try many times.
And only when im trying to restore user's password & creating new password from firestore service - everything is good & looks normally. Maybe its real generate automatically password to user or pass it from google auth?
How can i implement something to make it work? (If available - with example please). Sorry maybe for noob question, but i'm stuck.