Coder Social home page Coder Social logo

Comments (8)

mspado avatar mspado commented on June 12, 2024 1

I don't think the issue should be closed. It's not fixed and is still breaking things.

It quietly broke a batch process when we switched to admin.initializeApp(functions.config().firebase); instead of a manual toggle.

from firebase-functions.

manishtpatel avatar manishtpatel commented on June 12, 2024 1

@laurenzlong, reading 5.9.1 release note got me excited, thought this issue is resolved. Still not working with 5.9.1

5.9.1 release note
The admin.initializeApp() method can now be invoked without a credential option. This prompts the SDK to use Google Application Default Credentials.

What am i missing? What is this Google Application Default Credentials?

from firebase-functions.

jwngr avatar jwngr commented on June 12, 2024

In the future, please indicate when you cross post. I answered this one Stack Overflow. We hope to improve this situation in the future.

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024

Please file in https://github.com/firebase/firebase-admin-node if you would like to see createCustomToken() supported with default credentials.

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024

Within the functions runtime, admin.initializeApp(functions.config().firebase); is still the right way to initialize an admin app, even with 5.9.1 release. And functions.config().firebase is already using Application Default Credentials (this is a credential that is available in a Google-managed server, such as that of Cloud Functions, so that you don't have to supply a service account key).

tl;dr: The 5.9.1 release doesn't change the situation, if you would like to see createCustomToken() supported with the default credentials already available in the functions runtime, please file a request in https://github.com/firebase/firebase-admin-node

from firebase-functions.

sbnon avatar sbnon commented on June 12, 2024

admin.initializeApp(functions.config().firebase) appears to have been removed in Firebase Functions v1.0 (https://firebase.google.com/docs/functions/beta-v1-diff).

How do you now provide a custom certificate to Firebase with the v1.0 functions API?

from firebase-functions.

laurenzlong avatar laurenzlong commented on June 12, 2024

It is still not supported, please file a request in https://github.com/firebase/firebase-admin-node if you would like it to happen.

from firebase-functions.

camstuart avatar camstuart commented on June 12, 2024

+1

The docs I'm reading say that if I am running in a cloud function all I need do is:
admin.initializeApp(functions.config().firebase);

But I get the same error about the private key missing.

I am following the docs here:
https://firebase.google.com/docs/admin/setup

from firebase-functions.

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.