I just updated my firebase packages and noticed two regrations from the version of @react-native-firebase/auth 9.3.2 to version 9.3.5.
To put it in context, it is an authentication by phone number, on an Android device.
1 - When sending the phone number, I have a deeplink which redirects me to a web browser for reCAPTCHA verification.
It's rather annoying to leave the application like that, before version 9.3.5 I had never had this problem.
No reCAPTCHA verification.
2 - The verification code sent by SMS is no longer validated automatically.
Before version 9.3.5, I was automatically validated / authenticated when receiving the SMS, now I have to read the SMS and manually enter the verification code in the application.
_Please tell me if I missed anything, thank you for your help._
Click To Expand
#### `package.json`:
"@react-native-firebase/analytics": "^8.0.1",
"@react-native-firebase/app": "^9.0.0",
"@react-native-firebase/auth": "^9.3.5",
"@react-native-firebase/crashlytics": "^8.5.2",
"@react-native-firebase/dynamic-links": "^7.5.13",
"@react-native-firebase/firestore": "^7.10.3",
"@react-native-firebase/functions": "^7.4.12",
"@react-native-firebase/iid": "^7.4.12",
"@react-native-firebase/in-app-messaging": "^7.5.10",
"@react-native-firebase/messaging": "^8.0.1",
"@react-native-firebase/perf": "^7.4.12",
"@react-native-firebase/remote-config": "^10.0.1",
"@react-native-firebase/storage": "^7.4.14",
#### `firebase.json` for react-native-firebase v6:
{
"react-native": {
"messaging_android_notification_channel_id": "default",
"messaging_android_notification_color": "@color/white"
}
}
### iOS
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like:
# N/A
#### `AppDelegate.m`:
// N/A
Click To Expand
#### Have you converted to AndroidX? - [x] my application is an AndroidX application? - [x] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [x] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 19
compileSdkVersion = 29
targetSdkVersion = 29
firebaseIidVersion = "19.0.1" // default: "19.0.1"
supportLibVersion = '1.0.2'
mediaCompatVersion = '1.0.1'
supportV4Version = '1.0.0'
playServicesVersion = "17.0.0"
androidMapsUtilsVersion = "17.0.0"
}
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
maven { url "https://storage.googleapis.com/snap-kit-build/maven" }
}
dependencies {
classpath("com.android.tools.build:gradle:3.6.4")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:perf-plugin:1.3.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
maven { url "https://maven.google.com" }
maven { url "https://storage.googleapis.com/snap-kit-build/maven" }
}
}
#### `android/app/build.gradle`:
// N/A
#### `android/settings.gradle`:
// N/A
#### `MainApplication.java`:
// N/A
#### `AndroidManifest.xml`:
<!-- N/A -->
Click To Expand
**`react-native info` output:**
OUTPUT GOES HERE
- **Platform that you're experiencing the issue on**:
- [ ] iOS
- [x] Android
- [ ] **iOS** but have not tested behavior on Android
- [x] **Android** but have not tested behavior on iOS
- [ ] Both
- **`react-native-firebase` version you're using that has this issue:**
- `9.0.0`
- **`Firebase` module(s) you're using that has the issue:**
- `Auth`
- **Are you using `TypeScript`?**
- `No`
React Native Firebase and Invertase on Twitter for updates on the library.Does this happen if you override the firebase-android-sdk to 25.13.0 (I believe that was the last one prior to 26.0.0)?
You can do it like so:
https://github.com/mikehardy/rnfbdemo/blob/2bab72b2a99d2e16e6f3d24a6147c71be6bbd07a/make-demo.sh#L39
Nice, everything works fine on version 25.13.0.
About the version 26.0.0.
I was able to fix the web redirect with reCAPTCHA by enabling Android Device Verification API (SafetyNet) on google console.
But still no solution about autoverification code.
Does this mean that this feature has been removed from sdk 26.0.0?
Or that the implementation is not yet complete on React Native Firebase?
Thanks for checking @kperreau if nothing changed except overriding the BoM down to the previous version that does imply that either it stopped working or the feature is gone, both in the underlying firebase-android-sdk. It's a really important feature (IMHO) so I'd be surprised if it was removed (vs just broke accidentally) but either way I'd look upstream - I have no special knowledge on it: https://github.com/firebase/firebase-android-sdk/ - maybe there is something in their issue list?
For the reCAPTCHA it seems like we might be missing something in the integration docs that is new - IIRC from release notes they did add something like this so perhaps our docs need to catch up, if you can think of a good place in the docs and remember exactly what you did, there is an edit button at top right of each page and you could save other developers (even me actually 馃槄 ) some trouble by documenting the new step
Related stack overflow on enabling DeviceCheck https://stackoverflow.com/a/64657110/9910298
There is a mention as a comment there that after enabling it, SMS codes are no longer auto-consumed, so perhaps they are related. I have just enabled DeviceCheck for my work app and am an interested party here but likely won't have time to track it down.
It appears there is no upstream issue yet - strongly recommend logging one if you can. They typically won't accept react-native-firebase issues directly, they prefer something based on a native quickstart (https://github.com/firebase/quickstart-android/tree/master/auth) but as this has other reports and appears to be a regression between 25.13.0 and 26.0.0 they might investigate without a repro
I can confirm that enabling SafetyNet is not the cause of the SMS auto check issue, it just fixes the reCaptcha issue on sdk 26.0.0.
Since I went back to 25.13.0, everything is working again and I left SafetyNet activated, the autoconfirmation of the SMS works well, so it is indeed the transition from sdk 25.13.0 to 26.0.0 that is causing the problem.
PS: For those who want to know more about how to activate SafetyNet, the tutorial is here: https://firebase.google.com/docs/auth/android/phone-auth?authuser=0#enable-app-verification
Hello 馃憢, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
Safety net is Enabled and I tried both of versions discussed here but still recaptcha window prompt up and solve recaptcha how avoid recaptcha kindly help
Hello 馃憢, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
Can confirm the issue is still not solved in sdk 26.2.0.
Unless there is an upstream issue tracking this in firebase-android-sdk I don't think there will be any progress.
Most helpful comment
I can confirm that enabling SafetyNet is not the cause of the SMS auto check issue, it just fixes the reCaptcha issue on sdk
26.0.0.Since I went back to
25.13.0, everything is working again and I left SafetyNet activated, the autoconfirmation of the SMS works well, so it is indeed the transition from sdk25.13.0to26.0.0that is causing the problem.PS: For those who want to know more about how to activate SafetyNet, the tutorial is here: https://firebase.google.com/docs/auth/android/phone-auth?authuser=0#enable-app-verification