IOS EasyAuth.signOut() does not sign out.
Love the design of your library, though I'm having a few issues with EasyAuth.
I've been attempting to use easy-firebase for a basic email authentication IOS app, and it seems there there are some issues in the IOS example that are also happening when I implement the library with the base instructions provided.
Reproducible by compiling the latest IOS example, signing in with email, and attempting to sign out.
IOS 16.2 Iphone 14 Pro easy-firebase 1.4.3
Firestore rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
After setting the state of my app to "signed out", which brings my app back to it's original Sign In form, and running "EasyAuth.signOut()", I receive the following logged errors:
This is not a problem if I change my firestore rules to just "allow read, write;" (which is certainly not a solution). Is there a listener that could still be attached when the sign out function succeeds and my auth header is no longer valid?
It looks like stopping the listener before the guard check at onUserUpdate is fixing this issue in my case (swapping lines) 144 / 145:
Is there any reason why you want to keep the listener running if Auth._currentuser becomes nil?