FirebaseServerAppSettings interface Stay organized with collections Save and categorize content based on your preferences.
Configuration options given toinitializeServerApp()
Signature:
exportinterfaceFirebaseServerAppSettingsextendsOmit<FirebaseAppSettings,'name'>Extends: Omit<FirebaseAppSettings, 'name'>
Properties
| Property | Type | Description |
|---|---|---|
| appCheckToken | string | An optional App Check token. If provided, the Firebase SDKs that use App Check will utilize this App Check token in place of requiring an instance of App Check to be initialized.If the token fails local verification due to expiration or parsing errors, then a console error is logged at the time of initialization of theFirebaseServerApp instance. |
| authIdToken | string | An optional Auth ID token used to resume a signed in user session from a client runtime environment.InvokinggetAuth with aFirebaseServerApp configured with a validatedauthIdToken causes an automatic attempt to sign in the user that theauthIdToken represents. The token needs to have been recently minted for this operation to succeed.If the token fails local verification due to expiration or parsing errors, then a console error is logged at the time of initialization of theFirebaseServerApp instance.If the Auth service has failed to validate the token when the Auth SDK is initialized, then an warning is logged to the console and the Auth SDK will not sign in a user on initialization.If a user is successfully signed in, then the Auth instance'sonAuthStateChanged callback is invoked with theUser object as per standard Auth flows. However,User objects created via anauthIdToken do not have a refresh token. AttemptedrefreshToken operations fail. |
| releaseOnDeref | object | An optional object. If provided, the Firebase SDK uses aFinalizationRegistry object to monitor the garbage collection status of the provided object. The Firebase SDK releases its reference on theFirebaseServerApp instance when the providedreleaseOnDeref object is garbage collected.You can use this field to reduce memory management overhead for your application. If provided, an app running in a SSR pass does not need to performFirebaseServerApp cleanup, so long as the reference object is deleted (by falling out of SSR scope, for instance.)If an object is not provided then the application must clean up theFirebaseServerApp instance by invokingdeleteApp.If the application provides an object in this parameter, but the application is executed in a JavaScript engine that predates the support ofFinalizationRegistry (introduced in node v14.6.0, for instance), then an error is thrown atFirebaseServerApp initialization. |
FirebaseServerAppSettings.appCheckToken
An optional App Check token. If provided, the Firebase SDKs that use App Check will utilize this App Check token in place of requiring an instance of App Check to be initialized.
If the token fails local verification due to expiration or parsing errors, then a console error is logged at the time of initialization of theFirebaseServerApp instance.
Signature:
appCheckToken?:string;FirebaseServerAppSettings.authIdToken
An optional Auth ID token used to resume a signed in user session from a client runtime environment.
InvokinggetAuth with aFirebaseServerApp configured with a validatedauthIdToken causes an automatic attempt to sign in the user that theauthIdToken represents. The token needs to have been recently minted for this operation to succeed.
If the token fails local verification due to expiration or parsing errors, then a console error is logged at the time of initialization of theFirebaseServerApp instance.
If the Auth service has failed to validate the token when the Auth SDK is initialized, then an warning is logged to the console and the Auth SDK will not sign in a user on initialization.
If a user is successfully signed in, then the Auth instance'sonAuthStateChanged callback is invoked with theUser object as per standard Auth flows. However,User objects created via anauthIdToken do not have a refresh token. AttemptedrefreshToken operations fail.
Signature:
authIdToken?:string;FirebaseServerAppSettings.releaseOnDeref
An optional object. If provided, the Firebase SDK uses aFinalizationRegistry object to monitor the garbage collection status of the provided object. The Firebase SDK releases its reference on theFirebaseServerApp instance when the providedreleaseOnDeref object is garbage collected.
You can use this field to reduce memory management overhead for your application. If provided, an app running in a SSR pass does not need to performFirebaseServerApp cleanup, so long as the reference object is deleted (by falling out of SSR scope, for instance.)
If an object is not provided then the application must clean up theFirebaseServerApp instance by invokingdeleteApp.
If the application provides an object in this parameter, but the application is executed in a JavaScript engine that predates the support ofFinalizationRegistry (introduced in node v14.6.0, for instance), then an error is thrown atFirebaseServerApp initialization.
Signature:
releaseOnDeref?:object;Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-06 UTC.