Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code=17000 "The custom token format is incorrect. Please check the documentation."

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

I am able to create custom tokens using the Firebase Admin SDK.

I send them back to the client iOS app to use like this :

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'm using Firebase Admin 5.2.0 and the Firebase iOS client 4.0.0

Any idea?

like image 385
Monta Avatar asked Nov 18 '22 13:11

Monta


1 Answers

After checking the token and its lifetime, it turned out that a mismatch in system-time was the problem in our case.

After setting the timezone and the time to 'automatic', the problem was solved.

like image 180
Sudeep Prasad Avatar answered Dec 23 '22 05:12

Sudeep Prasad