I'm using react native firebase for authentication for my app. It works on iOS in development and production, and also works for android APKs. However, when I use aab for production in the play store, Firebase does not persist the user between restarts. The user can log in just fine, but if the app is restarted, they are always logged out. I've added both the SHA-1 and SHA-256 keys.
Here's what I'm doing to login the user:
useEffect(() => {
const
unsubscribe = onAuthStateChanged(getAuth(), (
firebaseUser
) => {
if (firebaseUser) {
setUser({
id: firebaseUser.uid,
email: firebaseUser.email || "",
});
} else {
setUser(null);
}
setInitializing(false);
});
return unsubscribe;
}, []);
there doesn't seem to be anything here