3

Tried following the instructions here:https://firebase.google.com/docs/auth/server/create-custom-tokens

to create a firebase custom token and on the server and then trying to sign in to firebase through the iOS SDK but getting this message with the custom token "The custom token corresponds to a different audience."

I am trying this use the node sdk, also tried the php route creating the token with third party jwt library. Is this broken in firebase 3.0?

TomWildcat
  • 349
  • 3
  • 12

1 Answers1

1

It's likely that the service account you are using to mint the custom token corresponds to a different project than the one you are using in your iOS client. The backend node server minting the token and the client calling signInWithCustomToken should belong to the same project.

bojeil
  • 29,642
  • 4
  • 69
  • 76
  • What, exactly, does "service account you are using to mint the custom token corresponds to a different project" mean? iiuc, if the service account has the correct permissions, it should work. – Alan Cabrera Jul 25 '22 at 02:10