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
Android onAuthStateChanged behavior does not match iOS and web #531
Comments
@esamelson Interesting scenario. Are you able to help us out by putting a break point in
This will tell us whether it's a Firebase SDK issue or something wrong with RNFirebase. Obviously, if this doesn't fire after 60 minutes then it's something that should be reported to Firebase. If it does, then we can investigate where the issue might be in our code... |
Sure, I can't do this right now, but I should be able to get to it sometime in the next few days. |
Great, no rush! |
@esamelson did you manage to check this out? |
@esamelson I tried this out on Friday by doing the following:
Several hours later and it still hadn't fired. I then repeated by deleting the user from the console rather than changing their password, and the same happened - no update by This does seem like it's a Firebase issue, though I'm interested in the fact that you saw iOS update. How did you change the user's password? |
@chrisbianca - sorry I wasn't able to get to this as quickly as I'd hoped. Interesting to hear that you weren't able to reproduce the behavior I saw on iOS. I consistently saw |
@Ehesp On iOS, I'm facing an issue where Edit |
Hello 👋, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information. |
I'm seeing this on iOS, whilst using |
Issue
I'm trying to use
firebase.auth().onAuthStateChanged()
to determine when a user's authentication has expired in the middle of using my app. The correct behavior according to Firebase's own JS SDK (which is replicated correctly for iOS in RNFirebase) is that as soon as authentication is no longer valid, the callback passed toonAuthStateChanged
is called withnull
as its only parameter. On Android, however, the callback is simply never called. The user must close and restart the app to get the callback called withnull
.Steps to replicate:
signInWithEmailAndPassword
Expected behavior (correct on iOS):
Callback previously passed to
onAuthStateChanged
is called withnull
Actual behavior on Android:
onAuthStateChanged
callback is not called. Instead, all database connections that require auth simply stop returning snapshots.Environment
The text was updated successfully, but these errors were encountered: