验证号码后如何确认收到的短信代码?

时间:2019-06-21 11:05:52

标签: firebase firebase-authentication react-native-firebase

firebase.auth().signInWithPhoneNumber(phoneNumber)返回确认结果,使我们可以确认已收到的SMS代码。

就像下面的代码一样:

firebase.auth().signInWithPhoneNumber(phoneNumber).then(confrimResult=>{
    confrimResult.confirm(code).then(user=>{
         if(user) console.log('SMS confirmed'); 
    });
});

现在,有没有办法确认firebase.auth().verifyPhoneNumber(phoneNumber)收到的SMS代码?

0 个答案:

没有答案