gpt4 book ai didi

android - Firebase 电话身份验证错误 : The SMS Code Has Expired

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:36:11 26 4
gpt4 key购买 nike

按照文档实现 FireBase 电话身份验证后,我遇到了几个问题。

  1. 某些号码无法验证:我使用 Airtel 作为我的服务提供商。

在日志中,我可以确认代码已发送,但我的手机尚未收到:

D/PhoneAuthenticating: onCodeSent:AM5PThBss5tbYdpNW5R9Q7o8zOYeHvd7lnZ1KBlS...

  1. 切换到另一个运营商,我可以收到代码,但在尝试验证后它说 SMS 代码已立即过期。我做了更多的尝试,结果是一样的

W/PhoneAuthenticating: signInWithCredential:failure com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The sms code has expired. Please re-send the verification code to try again. at com.google.android.gms.internal.nf.zzK(Unknown Source) at com.google.android.gms.internal.mg.zza(Unknown Source) at com.google.android.gms.internal.oa.zzL(Unknown Source) at com.google.android.gms.internal.oc.onFailure(Unknown Source) at com.google.android.gms.internal.nj.onTransact(Unknown Source) at android.os.Binder.execTransact(Binder.java:446)

抛出此异常:

FirebaseAuthInvalidCredentialsException

代码过期在 firebase 中花费的时间超过 3599 秒。验证时间不到一分钟

最佳答案

只是为了让您知道 firebase 电话身份验证中有一个自动检索部分,它将读取短信并在后台使其无效。该自动检索的回调应该用于验证您的用户,而无需他手动输入短信。

关于android - Firebase 电话身份验证错误 : The SMS Code Has Expired,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46522726/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com