If a signed in user completely closes the app and then re-opens it on iOS, the authStateChange listener returns a null user record and the user is forced to sign in again. It seems like the user is not being persisted to the phone.
To Reproduce
Create a basic iOS capacitor app and try it - If it works I have no idea how.
Expected behavior
Once registered, the authStateChange listener should return a user after the app is re-opened. It only ever returns null.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
Device: iPhone 15 Pro Max (simulator)
OS: 17.4
Browser: whatever capacitor uses by default in the webview
Version: N/A
Additional contextskipNativeAuth: false in the config
We have confirmed that everything is set up fine - we can log in with email/password however the user doesn't stay logged in.
We also have the firebase js sdk installed which works fine on the web. We are going to isolate out just the capacitor firebase package and see if the problem is conflicting firebase sdks, but considering the documentation states they can be used in tandem, I'm not so sure this is the problem.
Note: I just tested on android and the code I have works fine. This seems to be an iOS issue
Describe the bug
If a signed in user completely closes the app and then re-opens it on iOS, the
authStateChange
listener returns anull
user record and the user is forced to sign in again. It seems like the user is not being persisted to the phone.To Reproduce
Create a basic iOS capacitor app and try it - If it works I have no idea how.
Expected behavior
Once registered, the
authStateChange
listener should return a user after the app is re-opened. It only ever returnsnull
.Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
skipNativeAuth: false
in the configWe have confirmed that everything is set up fine - we can log in with email/password however the user doesn't stay logged in.
We also have the firebase js sdk installed which works fine on the web. We are going to isolate out just the capacitor firebase package and see if the problem is conflicting firebase sdks, but considering the documentation states they can be used in tandem, I'm not so sure this is the problem.
Note: I just tested on android and the code I have works fine. This seems to be an iOS issue