Bruno Soares
Bruno Soares

Reputation: 69

Google API identify toolkit returning configuration_not_found

While trying to login to a Firebase account using a custom token, this error shows. what would be the cause of the error?

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)

My current code

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();
                        }
                    }
                });

Upvotes: 3

Views: 1338

Answers (1)

Bruno Soares
Bruno Soares

Reputation: 69

Fixed adding this to gradle

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

@Edit Last version:

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

Upvotes: 2

Related Questions