'Unable to signinWithPhoneNumber using react-native-firebase
We keep on getting this error "We have blocked all requests from this device due to unusual activity. Try again later." When we try to signInWithPhoneNumber . This also blocks all the requests from same device even if I try to change the phone number. We have already setup SHA-256 certificate fingerprint to SHA key from "Upload key certificate" on Google PlayStore. We are generating a signed Apk with release mode on android and distribution IPA for iOS. We are unable to resolve this issue, please help us to identify the issue. We are developing this in React-Native.
```await firebase.auth().signInWithPhoneNumber(+${callingCode}${phoneNoText})
.then((confirmResult) => {
this.hideDialog();
this.props.navigation.navigate("verification", {
confirmResult: confirmResult,
registerOwnerData: data,
});
})
.catch((error) => {
this.hideDialog();
} }```
Solution 1:[1]
The error message "We have blocked all requests from this device due to unusual activity. Try again later." is usually thrown when a user is making SMS authentication requests a certain number of times using the same phone number or IP address. These repeated requests are considered suspicious behavior that temporarily blocks the device or IP address.
Additionally, there's a limit of 5 SMS per phone number per 4 hours. With this, you may try doing the following to resolve the issue:
Reduce the frequency of attempts to avoid triggering the anti-abuse system Try using whitelisted phone numbers for testing your app Use multiple testing devices (as the limits are applied per IP or device) Wait for an hour for the quota to lift.
Also, if we are testing our app then we can use a test number along with it we can set the default OTP code to test signing.
We can add the test number as shown in the attached image.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jignesh Mayani |


