首页 > 解决方案 > 尝试使用 Firebase 进行电话身份验证时出现 FirebaseAuthInvalidUserException。(ERROR_INVALID_USER_TOKEN)

问题描述

当我尝试使用测试人员电话号码(通过 firebase)对用户进行身份验证时,出现以下异常。

当我尝试发送 OTP 时收到以下警告。

 W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@1d54205

当我尝试验证凭据时出现以下异常(验证 otp)

 com.google.firebase.auth.FirebaseAuthInvalidUserException: This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.
    at com.google.firebase.auth.api.internal.zzdw.zza(com.google.firebase:firebase-auth@@18.1.0:6)
    at com.google.firebase.auth.api.internal.zzez.zza(com.google.firebase:firebase-auth@@18.1.0:21)
    at com.google.firebase.auth.api.internal.zzes.zza(com.google.firebase:firebase-auth@@18.1.0:35)
    at com.google.firebase.auth.api.internal.zzeu.zza(com.google.firebase:firebase-auth@@18.1.0:74)
    at com.google.firebase.auth.api.internal.zzec.zza(com.google.firebase:firebase-auth@@18.1.0:18)
    at com.google.android.gms.internal.firebase_auth.zza.onTransact(com.google.firebase:firebase-auth@@18.1.0:13)
    at android.os.Binder.execTransact(Binder.java:704)

我收到此异常的以下错误代码:ERROR_INVALID_USER_TOKEN.

该问题仅出现在设备Redmi Y2中。在其他设备中,它工作正常。我试图寻找解决方案。但我无法得到任何适当的解决方案。谁能帮我解决这个问题?

标签: androidfirebasefirebase-authentication

解决方案


推荐阅读