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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With