FirebaseApp interface
Stay organized with collections
Save and categorize content based on your preferences.
A FirebaseApp holds the initialization information for a collection of services.
Do not call this constructor directly. Instead, use initializeApp() to create an app.
Signature:
export interface FirebaseApp
Properties
FirebaseApp.automaticDataCollectionEnabled
The settable config flag for GDPR opt-in/opt-out
Signature:
automaticDataCollectionEnabled: boolean;
FirebaseApp.name
The (read-only) name for this app.
The default app's name is "[DEFAULT]"
.
Signature:
readonly name: string;
Example 1
// The default app's name is "[DEFAULT]"
const app = initializeApp(defaultAppConfig);
console.log(app.name); // "[DEFAULT]"
Example 2
// A named app's name is what you provide to initializeApp()
const otherApp = initializeApp(otherAppConfig, "other");
console.log(otherApp.name); // "other"
FirebaseApp.options
The (read-only) configuration options for this app. These are the original parameters given in initializeApp().
Signature:
readonly options: FirebaseOptions;
Example
const app = initializeApp(config);
console.log(app.options.databaseURL === config.databaseURL); // true
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-19 UTC.
[null,null,["Last updated 2024-01-19 UTC."],[],[],null,["# FirebaseApp interface\n\nA [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) holds the initialization information for a collection of services.\n\nDo not call this constructor directly. Instead, use [initializeApp()](./app.md#initializeapp_cb2f5e1) to create an app.\n\n**Signature:** \n\n export interface FirebaseApp \n\nProperties\n----------\n\n| Property | Type | Description |\n|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| [automaticDataCollectionEnabled](./app.firebaseapp.md#firebaseappautomaticdatacollectionenabled) | boolean | The settable config flag for GDPR opt-in/opt-out |\n| [name](./app.firebaseapp.md#firebaseappname) | string | The (read-only) name for this app.The default app's name is `\"[DEFAULT]\"`. |\n| [options](./app.firebaseapp.md#firebaseappoptions) | [FirebaseOptions](./app.firebaseoptions.md#firebaseoptions_interface) | The (read-only) configuration options for this app. These are the original parameters given in [initializeApp()](./app.md#initializeapp_cb2f5e1). |\n\nFirebaseApp.automaticDataCollectionEnabled\n------------------------------------------\n\nThe settable config flag for GDPR opt-in/opt-out\n\n**Signature:** \n\n automaticDataCollectionEnabled: boolean;\n\nFirebaseApp.name\n----------------\n\nThe (read-only) name for this app.\n\nThe default app's name is `\"[DEFAULT]\"`.\n\n**Signature:** \n\n readonly name: string;\n\n### Example 1\n\n // The default app's name is \"[DEFAULT]\"\n const app = initializeApp(defaultAppConfig);\n console.log(app.name); // \"[DEFAULT]\"\n\n### Example 2\n\n // A named app's name is what you provide to initializeApp()\n const otherApp = initializeApp(otherAppConfig, \"other\");\n console.log(otherApp.name); // \"other\"\n\nFirebaseApp.options\n-------------------\n\nThe (read-only) configuration options for this app. These are the original parameters given in [initializeApp()](./app.md#initializeapp_cb2f5e1).\n\n**Signature:** \n\n readonly options: FirebaseOptions;\n\n### Example\n\n const app = initializeApp(config);\n console.log(app.options.databaseURL === config.databaseURL); // true"]]