Closed iBasit closed 8 years ago
Thanks for the notice - in fact, it was me who refactored the Token Generator for version 3.0 :smile:
On the other hand - is there a reason why you require firebase/token-generator explicitly instead of using the (2.x) dependency that automatically comes with the bundle?
Oh, I see now - the README is not specific enough, sorry for the inconvenience! Until I update the package(s), please require the token generator with the ^2.1
constraint:
composer require firebase/token-generator "^2.1"
Actually I was using code from the documentation, which lead me to this error.
$firebase = $this->container->get('kreait_firebase.connection.main');
$tokenGenerator = $firebase->getConfiguration()->getAuthTokenGenerator();
$adminToken = $tokenGenerator->createAdminToken();
$firebase->setAuthToken($adminToken);
Thanks for the update, I'm already using directly token-generator to generate token for now, but wanted to open issue, so it can be fixed for others.
@iBasit Could you try with the current 0.5 release, please? When updating the version, please also remove the firebase/token-generator
dependency from your main composer.json
file - as I said, the latest Token Generator is already included with with the firebase library.
Please let me know if it still doesn't work (or if it does). Cheers! :octocat:
Works fine now :+1:
I did have installed the
composer require firebase/token-generator
I think they have change the path for FirebaseTokenGenerator to
Firebase\Token\TokenGenerator
, can you please update this on repo?Auth/TokenGenerator.php
Attempted to load class "Services_FirebaseTokenGenerator" from the global namespace. Did you forget a "use" statement?