Code = 17000 "Custom token format. Check the documentation."

I followed these steps: https://firebase.google.com/docs/auth/admin/create-custom-tokens

I can create custom tokens using the Firebase Admin SDK.

I send them back to the iOS client application for use as follows:

Auth.auth().signIn(withCustomToken: customToken ?? "") { (user, error) in
  // ...
}

But I get this error:

Code=17000 "The custom token format is incorrect. Please check the documentation." UserInfo={NSLocalizedDescription=The custom token format is incorrect. Please check the documentation., error_name=ERROR_INVALID_CUSTOM_TOKEN}

I am using Firebase Admin 5.2.0 and Firebase iOS client 4.0.0

Any idea?

+4
source share
1 answer

I try to solve a lot of time, and I found something interesting. Custom_toke ends with "% 3D% 3D", this is not valid, you need to replace it with "==" .. and it will work fine.

0

Source: https://habr.com/ru/post/1682620/


All Articles