invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.68k stars 2.21k forks source link

In Android, Firebase mobile number authentication is validating apart from sending wrong credential(OTP). #7827

Closed MynkPaliwal closed 4 months ago

MynkPaliwal commented 4 months ago

Issue

Sending wrong secret value(OTP) in credential of firebase.auth().signInWithCredential(). But then also it was authenticating the user and not giving any error.

firebase.auth().signInWithCredential(credential: AuthCredential)

export interface AuthCredential {
    providerId: string;
    token: string;
    secret: string;
}

Project Files

Javascript

Click To Expand

#### `package.json`: ```json "react": "18.2.0", "react-native": "0.71.0", "@react-native-firebase/auth": "^14.11.0", "@react-native-firebase/app": "^14.11.0", "@react-native-firebase/analytics": "^14.11.0" ``` #### `firebase.json` for react-native-firebase v6: ```json # N/A ```

iOS

Click To Expand

#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```


Android

Click To Expand

#### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy buildscript { ext { buildToolsVersion = "33.0.1" minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33 supportLibVersion = "30.0.3" kotlinVersion = "1.6.21" // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620" } repositories { google() mavenCentral() } dependencies { classpath("com.android.tools.build:gradle:7.3.1") classpath("com.facebook.react:react-native-gradle-plugin") classpath("de.undercouch:gradle-download-task:5.0.1") classpath 'com.google.gms:google-services:4.3.14' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0' classpath 'com.google.firebase:perf-plugin:1.4.2' } } ``` #### `android/app/build.gradle`: ```groovy // N/A ``` #### `android/settings.gradle`: ```groovy // N/A ``` #### `MainApplication.java`: ```java // N/A ``` #### `AndroidManifest.xml`: ```xml ```


Environment

Click To Expand

**`react-native info` output:** ``` OUTPUT GOES HERE ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **`react-native-firebase` version you're using that has this issue:** - `e.g. 5.4.3` - **`Firebase` module(s) you're using that has the issue:** - `e.g. Instance ID` - **Are you using `TypeScript`?** - `Y/N` & `VERSION`


mikehardy commented 4 months ago

Hi there, I'm going to close this - but if it is still happening with current versions can you open a new issue while respecting the issue template and including an example of code that will reproduce the problem?