Closed elodieirdor closed 9 years ago
Hi Elodie,
this is not yet possible with the bundle, but I am working on it - the base library this bundle is based upon already has the authentication support, so you could implement that in the meantime: https://github.com/kreait/firebase-php/releases
I hope that I can update the bundle in the next week.
Cheers :octocat: Jérôme
OK, I was thinking about doing a PR after updating firebase-php to version 0.6.1 but if you're going to work on it, I can wait :)
Thanks again.
If you already have something, please proceed - I am only hoping to get to it next week :)
I don't have anything yet. I just took a look around and found an issue : the http-adapter-bundle requires version 0.6.0 for the http-adapter whereas firebase-php requires version 0.7.0. I'll try to work on it this weekend.
I just released a new version of the bundle which includes the latest firebase-php release. It's a bit rough on the edges and includes manual work in your application code, but I think it is a start.
https://github.com/kreait/firebase-bundle#authentication
It includes adding a new configuration parameter secret
to a connection, an additional composer require firebase/token-generator
and the addition of some code in your controller or service:
$firebase = $this->container->get('kreait_firebase.connection.main');
$tokenGenerator = $firebase->getConfiguration()->getAuthTokenGenerator();
$adminToken = $tokenGenerator->createAdminToken();
$firebase->setAuthToken($adminToken);
Please let me know if this is a starting point you could work with.
Hello Jérôme,
Thanks a lot it's perfectly working! You did a great job.
Cheers
Thanks for the feedback, Elodie - I will close this issue then :)
Hello, Thanks for this bundle! I was wondering, is there any way to authenticate a user with this current version?