Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo Go Firebase User Does Not Persist #16702

Closed
balloman opened this issue Mar 21, 2022 · 2 comments
Closed

Expo Go Firebase User Does Not Persist #16702

balloman opened this issue Mar 21, 2022 · 2 comments
Labels

Comments

@balloman
Copy link

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/ or android/ 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

@balloman balloman added the needs validation Issue needs to be validated label Mar 21, 2022
@byCedric
Copy link
Member

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.

For now, the only thing I can think of is that it might be related to firebase/firebase-js-sdk#6050.

@byCedric byCedric added needs repro Firebase and removed needs validation Issue needs to be validated labels Mar 21, 2022
@balloman
Copy link
Author

That worked actually, not sure how I didn't find that earlier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants