User cannot sign in after the app is deleted and reinstalled

ive been having an issue with my code. If the user registers an account it brings them to the Main View, which is what I want however if the user uninstalls the app and reinstalls it they are unable to sign in. The app provides the user with the error "An error occurred. Please make sure your account details are accurate" and prints on Xcode "Account Found, Error fetching user document: User data is missing or could not be parsed Login error: User data is missing or could not be parsed." Im not too sure if this is an Xcode error or Firebase error. Everything on firebase seems to work when a user creates an account it has the correct info on firebase.

You don't actually explain where the user's details are stored? Are they on-device, or somewhere in the cloud?

You need to figure out a way of allowing a user to login regardless of where they are in your app.

If an app is deleted from a device, everything stored in that app's "sandbox" is deleted, too, so any information that a user is logged in should be deleted when the user deletes the app, so it looks like you're storing login data somewhere else?

Can you provide us with some more concrete data on how your app is structured?

User cannot sign in after the app is deleted and reinstalled
 
 
Q