ktamas77 / firebase-php

Firebase PHP Client
791 stars 215 forks source link

New firebase authentication #42

Closed kevin1193 closed 8 years ago

kevin1193 commented 8 years ago

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.

kevin1193 commented 8 years ago

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

mitjarobic commented 8 years ago

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?

foxted commented 8 years ago

Still getting this error as well:

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

Any tips?

richdho commented 8 years ago

@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

Bikeshtri commented 8 years ago

thanks @richdho it is working now

dusko23 commented 7 years ago

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 7 years ago

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?

chroda commented 7 years ago

Dudes, go to https://console.firebase.google.com/project/[projectname]/settings/serviceaccounts/databasesecrets

Copy secret.

thiagopnobre commented 7 years ago

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.