Auth0 Home Blog Docs

Delegation transition from v7 to v9 for Firebase

firebase

#1

Hi all,
I have an application that uses both Auth0 and Firebase.

Using Auth0.js, I followed the instructions here for changing delegation methodologies from getDelegationToken to client.delegation: Migrate getDelegationToken() to auth0.js v9

However, when I try to use the returned token for firebase login, I’m getting the error: “auth/invalid-custom-token:The custom token format is incorrect. Please check the documentation.”

For reference, here is the original (working) v7 code:

and here is the new (non-working) v9 code I’ve written:

“delegationResult.idToken” is what appears to be in the wrong format, but I don’t see any other value returned by the delegation endpoint to use.

Any help would be greatly appreciated!

Thanks


#2

Turns out I was using Firebase credentials that didn’t match the Firebase app associated with my Auth0 account. This works now!