gpt4 book ai didi

android - Google API 识别工具包返回 configuration_not_found

转载 作者:太空狗 更新时间:2023-10-29 13:12:24 25 4
gpt4 key购买 nike

尝试使用自定义 token 登录 Firebase 帐户时,显示此错误。错误的原因是什么?

07-25 15:04:16.523  2357   811 E Volley  : [448] BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyCustomToken?key={TOKEN_CODE}
07-25 15:04:16.524 2357 2530 I AuthChimeraService: Error description received from server: {
07-25 15:04:16.524 2357 2530 I AuthChimeraService: "error": {
07-25 15:04:16.524 2357 2530 I AuthChimeraService: "errors": [
07-25 15:04:16.524 2357 2530 I AuthChimeraService: {
07-25 15:04:16.524 2357 2530 I AuthChimeraService: "domain": "global",
07-25 15:04:16.524 2357 2530 I AuthChimeraService: "reason": "invalid",
07-25 15:04:16.524 2357 2530 I AuthChimeraService: "message": "CONFIGURATION_NOT_FOUND"
07-25 15:04:16.524 2357 2530 I AuthChimeraService: }
07-25 15:04:16.524 2357 2530 I AuthChimeraService: ],
07-25 15:04:16.524 2357 2530 I AuthChimeraService: "code": 400,
07-25 15:04:16.524 2357 2530 I AuthChimeraService: "message": "CONFIGURATION_NOT_FOUND"
07-25 15:04:16.524 2357 2530 I AuthChimeraService: }
07-25 15:04:16.524 2357 2530 I AuthChimeraService: }
07-25 15:04:16.524 2357 2530 D AuthIntentChimeraService: Finished operation: << dms (350ms elapsed)

我当前的代码

mAuth = FirebaseAuth.getInstance();
mAuth.signInWithCustomToken(mCustomToken)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
Log.d("d", "signInWithCustomToken:onComplete:" + task.isSuccessful());

if (!task.isSuccessful()) {
Log.w("d", "signInWithCustomToken", task.getException());
Toast.makeText(MainActivity.this, "Authentication failed.",
Toast.LENGTH_SHORT).show();
}
}
});

最佳答案

修复了将其添加到 gradle

compile 'com.google.firebase:firebase-core:9.2.1'

@编辑最新版本:

implementation 'com.google.firebase:firebase-core:16.0.1'

关于android - Google API 识别工具包返回 configuration_not_found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38574782/

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