Cannot authenticate to Firebase using Auth0 token

I’m using the delegate endpoint (on Android) to get a token to Amazon (aws) and Firebase. The Amazon delegation is working fine, but when I try to login to Firebase using the Auth0 token I get an error saying:

The custom token format is incorrect. Please check the documentation.

The code I’m using is:

        JSONObject jsonObject = new JSONObject();
        jsonObject.put("client_id", clientId);
        jsonObject.put("grant_type", "urn:ietf:params:oauth:grant-type:jwt-bearer");
        jsonObject.put("id_token", idToken);
        jsonObject.put("scope", "openid profile email");
        jsonObject.put("api_type", "firebase");

        JsonObjectRequest objectRequest = new JsonObjectRequest(Request.Method.POST, AUTH0_DOMAIN_URL, jsonObject, responseListener, errorListener);

I got the response: {"token_type":"Bearer","expires_in":36000,"id_token":"eyJ0eXA[…]f0"}, and I use this id_token to authenticate to Firebase using signInWithCustomToken() method

1 Like

Hey @filipe.ramos

As it has been more than a few months since this topic was opened and there has been no reply or further information provided from the community as to the existence of the issue we would like to check if you are still facing the described challenge?

We are more than happy to assist in any way! If the issue is still out there please let us know so we can create a new thread for better visibility, otherwise we’ll close this one in week’s time.

Thank you!

This topic was automatically closed after 6 days. New replies are no longer allowed.