我从 react-native firebase 安装 firebase
# Using npm
npm install --save @react-native-firebase/app
yarn add @react-native-firebase/auth
向用户号码发送OTP的代码:
async signUpOTP(obj) {
console.log('signInWithPhoneNumber', obj);
const { number, pin, confirmPin } = this.state
let prefix = '+92' + number;
auth().signInWithPhoneNumber(prefix)
.then((confirmationResult) => {
AsyncStorage.setItem('@signItem', JSON.stringify(obj));
this.props.navigation.navigate('signupcode', { 'confirmationResult': confirmationResult, 'number': number, 'pin': pin, 'confirmPin': confirmPin })
this.setState({ visible: false });
}).catch((error) => {
console.log(error, 'catch me');
let invalidError = 'Invalid Number';
toastMsg(invalidError)
this.setState({ visible: false });
});
}
但是,它显示的是重新验证码屏幕而不是发送 OTP 代码
有什么办法可以避免这个 Recaptcha 屏幕吗?