we use the function signInWithCustomToken to log in our users to Firebase. From our server we generate the token using the php-jwt library (
https://github.com/firebase/php-jwt) that you suggest in your documentation.
Through the "service accounts" panel we generated all the information needed (private_key, etc...) and everything worked fine. Our server returns a generated token when the user logs in and then we use it to call signInWithCustomToken to successfully identify the user.
The problem occured after a few days of use. We touched nothing and suddenly we started receiving "Token invalid format. Please, check the documentation", code: 17000.
We have created a new "Service Account" and updated all the information on the server side code (where we generate the token) and it started working again. We really can't understand why we had to generate the account again and modify our source code.
Could you please help us understanding why our token started to fail? Will this happen in the future? There's nothing we are missing?
Many thanks in advance!