You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I am aware, the user for the expo firebase library should be persisted between app restarts unless explicitly set not to do so. However, this does not occur. On every app relaunch, the current user is null, even after using the onAuthStateChanged observer. Since I cannot find this issue with anyone not using Expo Go, I have to assume that is the reason.
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
useEffect(() => getAuth().onAuthStateChanged(value => {
if (value) {
console.log("User is signed in");
navigation.navigate("map")
}else {
console.log("User is signed out");
}
}), [])
No matter how many times the user signs in, (which is successful as the event fires the message "User is signed in".) On app relaunch, the user is null
The text was updated successfully, but these errors were encountered:
Hi @balloman! Thanks for writing in, unfortunately, I can't reproduce this issue with the code you provided. It's not a complete repo, if you can share a repository with everything required to recreate that issue, it would help.
Summary
As far as I am aware, the user for the expo firebase library should be persisted between app restarts unless explicitly set not to do so. However, this does not occur. On every app relaunch, the current user is null, even after using the onAuthStateChanged observer. Since I cannot find this issue with anyone not using Expo Go, I have to assume that is the reason.
Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
43.0.0
Environment
expo-env-info 1.0.2 environment info:
System:
OS: Windows 10 10.0.22000
Binaries:
Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.5.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8139111
npmPackages:
@expo/webpack-config: ^0.12.71 => 0.12.82
expo: 43.0.0 => 43.0.0
react: 17.0.1 => 17.0.1
react-dom: ^17.0.2 => 17.0.2
react-native: https://github.com/expo/react-native/archive/sdk-43.0.0.tar.gz => 0.64.2
react-native-web: ^0.16.3 => 0.16.5
Expo Workflow: managed
Reproducible demo
useEffect(() => getAuth().onAuthStateChanged(value => {
if (value) {
console.log("User is signed in");
navigation.navigate("map")
}else {
console.log("User is signed out");
}
}), [])
No matter how many times the user signs in, (which is successful as the event fires the message "User is signed in".) On app relaunch, the user is null
The text was updated successfully, but these errors were encountered: