ktamas77/firebase-php

New firebase authentication

Closed this issue ยท 9 comments

Firebase created a new authentication putting only the secret key returns "Cannot parse token". Now this module only works in public firebase database. Kindly help to resolve this issue.

I think this is resolved already. Just use the database secret instead of token.

I am using the database secret and i get the error:

"""
{\n
"error" : "Could not parse auth token."\n
}\n
"""

Does it still work for you?

Still getting this error as well:

"""
{\n
"error" : "Could not parse auth token."\n
}\n
"""

Any tips?

@mitjarobic @foxted @kevin1193
You might use a wrong secret. Please make sure that you got it from the right place:
It is in the project setting -> database tab
http://stackoverflow.com/a/37418932

thanks @richdho it is working now

Hi kevin1193, mitjarobic
what about this statement.
Authenticating with a database secret has been officially deprecated since November 2016 and will be removed from this library in Release 3.0.
[http://firebase-php.readthedocs.io/en/latest/authentication.html]
Using secret appears to be of short life time. Building app on secret does not feel safe in medium run.
Any other suggestion how to make protected database to work with token ?

ivent commented

Hello, I also had problems with the token error with the latest interface of firebase that was resolved when changing through the secret, but there is a big alert saying that it has been discontinued, you could do an update to update this script and do the Login as updated?

The link https://console.firebase.google.com/project/[projectname]/settings/serviceaccounts/databasesecrets is deprecated now.

This issue needs to be reopened because the new available key does not works with the gem.