-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Inconsistent error code for getIdToken iOS vs Android, when device offline #3654
Comments
Thanks for the report! PR is up with a fix - waiting for CI and then this will be available on the '7.0.2' release of the Auth package. FYI: |
@draperunner Auth v7.0.2 is up with this - thanks for the report :) |
Great, thanks! |
Issue
I am trying to fetch the ID token for the currentUser. If the device has been offline long enough for the token to have expired, and still is offline when calling
getIdToken
, the method will throw an error. On iOS this error has the codeauth/network-request-failed
, which is expected. On Android though, it's justauth/unknown
. Theerror.message
is[auth/unknown] A network error (such as timeout, interrupted connection or unreachable host) has occurred.
I would expect the error code on Android to also be
auth/network-request-failed
in this case.Project Files
Javascript
Click To Expand
package.json
:# N/A
firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:@react-native-firebase/[email protected]
Firebase
module(s) you're using that has the issue:auth
TypeScript
?N
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: