Code Monkey home page Code Monkey logo

Comments (5)

jeromegamez avatar jeromegamez commented on August 21, 2024

Thanks for the notice - in fact, it was me who refactored the Token Generator for version 3.0 😄

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?

from firebase-bundle.

jeromegamez avatar jeromegamez commented on August 21, 2024

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"

from firebase-bundle.

iBasit avatar iBasit commented on August 21, 2024

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.

from firebase-bundle.

jeromegamez avatar jeromegamez commented on August 21, 2024

@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:

from firebase-bundle.

iBasit avatar iBasit commented on August 21, 2024

Works fine now 👍

from firebase-bundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.