Firebase Admin Node.js SDK Release Notes

To see release notes for the Firebase console and for other Firebase platforms and related SDKs, see the Firebase Release Notes.

Version 6.0.0 - August 9, 2018

  • The Admin SDK no longer supports Node.js 4. Developers must use Node.js 6 or higher to deploy the Admin SDK.
  • The Admin SDK now installs Cloud Firestore and Cloud Storage libraries as optional dependencies. SDK installation no longer fails when encountering errors from Cloud Firestore, Cloud Storage or gRPC dependencies.
  • Upgraded the Cloud Firestore client from 0.15.4 to 0.16.0. This version contains a new array-contains query operator and FieldValue.arrayUnion() and FieldValue.arrayRemove() APIs.

Version 5.13.1 - July 23, 2018

  • Upgraded the Cloud Firestore client from 0.15.2 to 0.15.4. This version contains a bug fix that enables using it in environments where application default credentials are not available.

Version 5.13.0 - July 17, 2018

  • The Admin SDK can now read the Firebase/Google Cloud Platform project ID from both GCLOUD_PROJECT and GOOGLE_CLOUD_PROJECT environment variables.
  • Upgraded the Cloud Firestore client from 0.14.0 to 0.15.2. This version of the Firestore client changes how date values are handled.

Authentication

  • The Admin SDK can now create custom tokens without being initialized with service account credentials.
  • The SDK accepts a new serviceAccountId app option, which can be used to specify just the client email of a service account.
  • When deployed in an environment managed by Google (e.g. Google Cloud Functions), the SDK can auto discover a service account ID without any explicit configuration.

Realtime Database

  • Updated typings of the admin.database.Query.once() method to return a more specific type.

Cloud Messaging

  • Updated typings of the admin.messaging.WebpushNotification type to include all supported notification fields.

Version 5.12.1 - May 15, 2018

  • Admin SDK now lazy loads all child namespaces and certain heavy dependencies for faster load times. This change also ensures that only the sources for namespaces that are actually used get loaded into the Node.js process.
  • Upgraded the Cloud Firestore client from 0.13.0 to 0.14.0.

Version 5.12.0 - April 05, 2018

Authentication

Cloud Messaging

  • Added the mutableContent optional field to the messaging.Aps type. This can be used to set the mutable-content property when sending FCM messages to APNS targets.
  • Added support for specifying arbitrary key-value fields in the messaging.Aps type.

Version 5.11.0 - March 15, 2018

Authentication

Version 5.10.0 - March 08, 2018

  • Upgraded the Realtime Database client from 0.1.11 to 0.2.0. This provides the ability to call admin.database().ref() with an existing reference as the argument.
  • Upgraded the Cloud Firestore client from 0.12.0 to 0.13.0.

Version 5.9.1 - February 28, 2018

  • The admin.initializeApp() method can now be invoked without a credential option. The SDK uses Google Application Default Credentials when initialized this way.
  • Upgraded the Cloud Firestore client from 0.11.1 to 0.12.0.
  • Upgraded the Cloud Storage client from 1.2.1 to 1.6.0.
  • Upgraded the Realtime Database client from 0.1.3 to 0.1.11.

Version 5.9.0 - February 14, 2018

Cloud Messaging

Version 5.8.2 - January 30, 2018

  • Exposed admin.firestore.DocumentReference and admin.firestore.DocumentSnapshot types from the Admin SDK typings.
  • Upgraded Firestore dependency version to 0.11.2. This includes several bug fixes including a fix in the DocumentReference.update() operation.

Version 5.8.1 - January 17, 2018

  • Upgraded Firestore dependency version from 0.10.0 to 0.11.1. This includes several bug fixes in Cloud Firestore.

Version 5.8.0 - January 11, 2018

Initialization

  • The admin.initializeApp() method can now be invoked without any arguments. This initializes an app using Google Application Default Credentials, and other AppOptions loaded from the FIREBASE_CONFIG environment variable.

Authentication

  • Upgraded the jsonwebtoken library to 8.1.0.

Version 5.7.0 - January 04, 2018

Authentication

  • A new revokeRefreshTokens() method for revoking refresh tokens issued to a user.
  • The verifyIdToken() method now accepts an optional checkRevoked argument, which can be used to check if a given ID token has been revoked.

Version 5.6.0 - December 21, 2017

  • A new admin.instanceId() API that facilitates deleting instance IDs and associated user data from Firebase projects.
  • Updated the TypeScript typings for admin.AppOptions to reflect the introduction of the projectId option.
  • Removed some unused third party dependencies.

Version 5.5.1 - November 21, 2017

Cloud Firestore

  • Upgraded the Cloud Firestore client to the latest available version, which adds input validation to several operations, and retry logic to handle network errors.

Realtime Database

  • Fixed an issue in the TypeScript typings of the Realtime Database API.

Version 5.5.0 - November 10, 2017

Realtime Database

  • app.database() method now optionally accepts a database URL. This feature can be used to access multiple Realtime Database instances from the same app.
  • Upgraded the Realtime Database client to the latest available version.

Cloud Firestore

  • Upgraded the Cloud Firestore client to the latest available version.

Version 5.4.3 - October 24, 2017

  • Fixed a regression in module loading that prevented using the Admin SDK in environments like AWS Lambda. This regression was introduced in the 5.4.0 release, which added a new dependency to Firestore and gRPC. This fix lazily loads Firestore and gRPC, thus enabling Admin SDK usage in the affected environments as long as no explicit attempts are made to use the Firestore API.

Version 5.4.2 - October 09, 2017

  • Upgraded the Cloud Firestore client dependency to 0.8.2, which resolves an issue with saving objects with nested document references.

Version 5.4.1 - October 03, 2017

  • Upgraded the Firestore client dependency to 0.8.1, which resolves the installation issues reported in the Yarn environment.

Version 5.4.0 - October 03, 2017

Version 5.3.0 - September 27, 2017

  • SDK now retries outbound HTTP calls on all low-level I/O errors.

Authentication

Storage

  • Declared a more concrete TypeScript return type (Bucket) for the bucket() method in the Storage API.

Version 5.2.1 - August 16, 2017

  • A bug in the TypeScript type declarations that come bundled with the SDK (index.d.ts) has been fixed.

Version 5.2.0 - August 14, 2017

Authentication

  • New type definitions for the arguments of createUser() and updateUser() methods.

Cloud Messaging

  • Redefined the arguments of sendToDevice() using intersection instead of overloading.

Version 5.1.0 - July 25, 2017

Authentication

  • Added the method getUserByPhoneNumber() to the admin.auth interface. This method enables retrieving user profile information by a phone number.
  • createUser() and updateUser() methods now accept a phoneNumber property, which can be used to create users with a phone number field and/or update the phone number associated with a user.
  • Added the phoneNumber field to admin.auth.UserRecord, which exposes the phone number associated with a user account.
  • Added the phoneNumber field to admin.auth.UserInfo, which exposes the phone number associated with a user account by a linked identity provider.

Version 5.0.1 - July 12, 2017

  • Improved the error messages thrown in the case of network and RPC errors. These errors now include outgoing HTTP request details that make it easier to localize and debug issues.

Authentication

  • Implemented support in the user management API for handling photo URLs with special characters.

Version 5.0.0 - May 17, 2017

Initialization

  • The deprecated serviceAccount property in the admin.App.Options type has been removed in favor of the credential property.
  • Initializing the SDK without setting a credential results in an exception.
  • Initializing the SDK with a malformed private key string results in an exception.

Authentication

  • createdAt and lastSignedInAt properties in admin.auth.UserMetadata have been renamed to creationTime and lastSignInTime. Also these properties now provide UTC formatted strings instead of Date values.

Version 4.2.1 - April 12, 2017

  • Updated the SDK to periodically refresh the OAuth access token internally used by FirebaseApp. This reduces the number of authentication failures encountered at runtime by SDK components like Realtime Database.

Version 4.2.0 - April 04, 2017

Cloud Messaging

Version 4.1.4 - March 28, 2017

Authentication

  • Cleaned up a number of types to improve the log output, thereby making debugging easier.

Realtime Database

  • Fixed an issue which could cause infinite loops when using push() with no arguments.

Version 4.1.3 - March 7, 2017

  • Fixed incorrect usage of undefined - as opposed to void - in several places in the TypeScript typings.
  • Added missing properties to the TypeScript typings for DecodedIdToken.
  • Fixed issues when using some types with the TypeScript strictNullChecks option enabled.
  • Removed incorrect admin.Promise type from the TypeScript typings in favor of the Node.js built-in Promise type, which the SDK actually uses.
  • Added error codes to all app-level errors. All errors in the SDK now properly implement the FirebaseError interface.
  • Improved error handling when initializing the SDK with a credential that cannot generate valid access tokens.
  • Added new admin.database.EventType to the TypeScript typings.

Realtime Database

  • Improved how the Realtime Database reports errors when provided with various types of invalid credentials.

Version 4.1.2 - March 2, 2017

Authentication

  • Improved input validation and error messages for all user management methods.
  • verifyIdToken() now works with non-cert credentials, assuming the GCLOUD_PROJECT environment variable is set to your project ID, which is the case when running on Google infrastructure such as Google App Engine and Google Compute Engine.

Realtime Database

  • Added toJSON() methods to the DataSnapshot and Query objects to make them properly JSON-serializable.

Cloud Messaging

Version 4.1.1 - February 14, 2017

  • Added in missing TypeScript typings for the FirebaseError.toJSON() method.

Authentication

  • Fixed issue with createUser() which sometimes caused multiple users to share the same email.

Version 4.1.0 - February 2, 2017

  • Added in missing TypeScript typings for the toJSON() method off of several objects.

Cloud Messaging

Version 4.0.6 - January 24, 2017

Initialization

  • Fixed an issue which caused importing the library via the ES2015 import syntax (import * as admin from "firebase-admin") to not work properly.

Version 4.0.5 - January 17, 2017

  • TypeScript support has been greatly improved. Typings for the Realtime Database are now available and all other known issues with incorrect or incomplete type information have been resolved.

Initialization

  • Fixed an issue which caused the SDK to appear to hang when provided with a credential that generated invalid access tokens. The most common cause of this was using a credential whose access had been revoked. Now, an error will be logged to the console in this scenario.

Authentication

  • The error message for an auth/internal-error error now includes the raw server response to more easily debug and track down unhandled errors.
  • Fixed an issue that caused an auth/internal-error error to be thrown when calling getUser() or getUserByEmail() for a user without a creation date.
  • Fixed an issue which caused an auth/internal-error error to be thrown when calling createUser() with an email that corresponds to an existing user.
  • Fixed an issue which caused an auth/internal-error error to be thrown when calling Authentication methods with a credential with insufficient permission. Now, an auth/insufficient-permission error will be thrown instead.

Version 4.0.4 - December 6, 2016

Authentication

  • Fixed an issue that caused several Authentication methods to throw an error when provided with inputs containing Unicode characters.

Version 4.0.3 - November 21, 2016

Initialization

  • Fixed an issue that caused a null value for the databaseAuthVariableOverride property to be ignored when passed as part of the first argument to initializeApp(), which caused the app to still have full admin access. Now, passing this value has the expected behavior: the app has unauthenticated access to the Realtime Database, and behaves as if no user is logged into the app.

Authentication

  • Fixed an issue that caused an auth/invalid-uid error to be thrown for valid uid values passed to several Authentication methods.

Version 4.0.2 - November 15, 2016

  • Improved error messages throughout the Admin Node.js SDK.
  • Upgraded dependencies so that the Admin Node.js SDK no longer throws warnings for using deprecated Buffer APIs in Node.js 7.x.x.

Version 4.0.1 - November 9, 2016

  • Fixed issue which caused the 4.0.0 release to not include the README.md and npm-shrinkwrap.json files.

Version 4.0.0 - November 7, 2016

  • The Admin Node.js SDK (available on npm as firebase-admin) is a new SDK which replaces and expands the admin capabilities of the standard firebase npm module. See Add the Firebase Admin SDK to your Server to get started.
  • This version does not include the README.md and npm-shrinkwrap.json files. This was fixed in version 4.0.1.

Initialization

Authentication

  • A new Admin API for managing your Firebase Authentication users is now available. This API lets you manage your users without using their existing credentials, and without worrying about client-side rate limiting. The new methods included in this API are getUser(), getUserByEmail(), createUser(), updateUser(), and deleteUser(). See Manage Users for more details.
  • The createCustomToken() method is now asynchronous, returning a Promise<string> instead of a string.

Send feedback about...

Need help? Visit our support page.