且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Firebase电话身份验证错误:SMS代码已过期

更新时间:2023-01-06 15:33:43

最后得到了解决方案. 在验证用户身份的过程中,我们仅使用添加新参数的方法来发送代码.

Finally got the solution. During authenticating the user, we use the same method for sending the code only that we add a new parameter.

PhoneAuthCredential credential = PhoneAuthProvider.getCredential(verificationId, code);
    signInWithPhoneAuthCredential(credential);
    Toast.makeText(this, "Verifying...", Toast.LENGTH_SHORT).show();