User authenticated but the corresponding doc in the Firestore not created #6719
Replies: 1 comment
-
It's always possible this can happen, however if the user does not have the firestore record you may be default assume you need to initialize them whenever they log in (or whenever you attempt to access something) and correct things on-demand by just doing the firestore user initialization yes? Or you can do a function This though:
React-native only supports two major versions, 0.68 is the oldest that is in support I think? And I don't believe this version even compiles on current Xcode? I'd be worried with react-native this old...
This is an illegal combination, I'm shocked it works. All versions should be the same and you'll want to update to current stable to make sure it works on current mobile operating systems - https://invertase.io/blog/react-native-firebase-versioning |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a strange problem with the signup process in my react-native app.
Problem: My app creates user record (I am using
auth().createUserWithEmailAndPassword(email, password)
) in the auth service but sometimes doesn't create the corresponding user document in FireStore ("users" collection).It occurred for 70 users in 3000 signed-up users.
I mean, I realized that 70 of our 3000 users have a record in the Firebase Authentication service but haven't their documents in the Firestore.
I don't know what happened and don't have any idea.
Just I am thinking about network problems during the signup process. I mean those 70 users' networks have problems and their connection was lost then the request to create their database doc failed.
How can I fix this major blocker?
The only thing that I can think about is moving the signup process to a Cloud function. Do you have another?
This is my signup code:
Versions:
"react-native": "^0.64.0",
"firebase": "^8.3.1",
"@react-native-firebase/app": "^12.8.0",
"@react-native-firebase/auth": "^11.3.1",
"@react-native-firebase/database": "^11.3.1",
"@react-native-firebase/firestore": "^11.3.1",
"@react-native-firebase/functions": "15.1.1",
"@react-native-firebase/messaging": "^12.9.2",
"@react-native-firebase/remote-config": "^12.7.5",
Beta Was this translation helpful? Give feedback.
All reactions