Skip to content

Conversation

@Ehesp
Copy link
Member

@Ehesp Ehesp commented Nov 14, 2025

This PR aims to align the app API more closely with Node. Changes:

  • FirebaseAdminApp is now has a private constructor.
  • FirebaseAdmin class exists, with static initalizeApp + getApps etc methods
  • The params for initalizeApp are now all optional, whereas right now they are required
  • The options for an app exist on AppOptions (should probably name this FirebaseAppOptions(?), inline with the node sdk. This also adds support for some missing options such as storage bucket which we'll need.
  • The projectId (now inside of AppOptions) will always exist. Like node, it first checks for a user provided value, then the credential (if its a service account), then finally the environment. Which allows no options to initalizeApp, for use on GCP environments.
  • There's also a couple of useful methods for fetching from say Compute Engine if it's running there, as per the node sdk.
  • Credential has been reworked - its now a sealed class, and a credential can either be a ServiceAccountCredential or ApplicationDefaultCredential, which is used to detect the projectId.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants