Raj*_*v K 5 firebase react-native firebase-authentication
如何firebase.auth.RecaptchaVerifier使用firebase web方法设置in react native来验证电话号码并通过在设备上接收OTP进行身份验证.使用某些方法但不能在移动设备上工作.
使用Web方法进行原生反应的代码:
var appVerifier = firebase.auth.RecaptchaVerifier;
// window.recaptchaVerifier =
// new firebase.auth.RecaptchaVerifier('recaptcha-container');
firebase.auth().signInWithPhoneNumber('+919843191338', appVerifier)
.then(function (confirmationResult) {
Alert.alert(confirmationResult);
window.confirmationResult = confirmationResult;
}).catch(function (error) {
// Error; SMS not sent
// ...
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1326 次 |
| 最近记录: |