我需要使用 Firebase 进行电话身份验证,但每次我单击将代码发送给用户的按钮时,都会显示此错误,这可能很容易解决,但由于我对 Firebase 和 React Native 的了解不是很深,所以我无法找到解决方案。
这是我的代码:
export default class VerifyCell extends Component{
static navigationOptions = {header: null}
constructor(props){
super(props);
this.state = {
code: '',
};
}
render(){
const celular = this.props.navigation.getParam('celular');
return (
<ScrollView style={styles.container}>
<HeaderIcon type='MaterialCommunityIcons' name='message-processing'/>
<Text style={styles.titulo}>Phone Verification</Text>
<Text style={styles.dica}>Insert the code that has been sent to you below</Text>
<FormItem onChangeText={ (code) => this.setState({code}) } texto='Code'/>
<View style={{marginBottom: '40%'}}></View>
<GradientButton texto='Send code' onPress={async () => {
const confirmation = await auth().signInWithPhoneNumber('+55 19995661551');
}}/>
<View …Run Code Online (Sandbox Code Playgroud)