Timestamptype from the
admin.database.Query.once()method to return a more specific type.
WebpushNotificationtypings to match the current API.
mutableContentoptional field to the
Apstype of the FCM API.
auth.importUsers()method for importing users to Firebase Auth in bulk.
admin.database().ref()method with another
Referenceinstance as the argument.
admin.initializeApp()method can now be invoked without an explicit
credentialoption. In that case the SDK will get initialized with Google application default credentials.
messaging.send()method and the new
Messagetype for sending Cloud Messaging notifications via the new FCM REST endpoint.
admin.firestore.DocumentSnapshottypes from the Admin SDK typings.
admin.initializeApp()method can now be invoked without any arguments. This initializes an app using Google Application Default Credentials, and other
AppOptionsloaded from the
jsonwebtokenlibrary to 8.1.0.
revokeRefreshTokens()method for revoking refresh tokens issued to a user.
verifyIdToken()method now accepts an optional
checkRevokedargument, which can be used to check if a given ID token has been revoked.
admin.instanceId()API that facilitates deleting instance IDs and associated user data from Firebase projects.
admin.AppOptionsto reflect the introduction of the
app.database()method now optionally accepts a database URL. This feature can be used to access multiple Realtime Database instances from the same app.
admin.firestore()API that facilitates accessing Google Cloud Firestore databases using the
@google-cloud/firestorelibrary. See Set Up Your Node.js App for Cloud Firestore to get started.
setCustomUserClaims()method for setting custom claims on user accounts. Custom claims set via this method become available on the ID tokens of the corresponding users when they sign in. To learn how to use this API for controlling access to Firebase resources, see Control Access with Custom Claims and Security Rules.
listUsers()method for listing all the users in a Firebase project in batches.
Bucket) for the
bucket()method in the Storage API.
index.d.ts) has been fixed.
sendToDevice()using intersection instead of overloading.
admin.authinterface. This method enables retrieving user profile information by a phone number.
updateUser()methods now accept a
phoneNumberproperty, which can be used to create users with a phone number field and/or update the phone number associated with a user.
admin.auth.UserRecord, which exposes the phone number associated with a user account.
admin.auth.UserInfo, which exposes the phone number associated with a user account by a linked identity provider.
serviceAccountproperty in the
admin.App.Optionstype has been removed in favor of the
admin.auth.UserMetadatahave been renamed to
lastSignInTime. Also these properties now provide UTC formatted strings instead of
FirebaseApp. This reduces the number of authentication failures encountered at runtime by SDK components like Realtime Database.
admin.messaging()service. The new methods allow subscribing to and unsubscribing from topics via registration tokens.
push()with no arguments.
undefined- as opposed to
void- in several places in the TypeScript typings.
admin.Promisetype from the TypeScript typings in favor of the Node.js built-in
Promisetype, which the SDK actually uses.
admin.database.EventTypeto the TypeScript typings.
verifyIdToken()now works with non-cert credentials, assuming the
GCLOUD_PROJECTenvironment 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.
toJSON()methods to the
Queryobjects to make them properly JSON-serializable.
sendToDeviceGroup()are provided with unexpected inputs.
createUser()which sometimes caused multiple users to share the same email.
toJSON()method off of several objects.
admin.messaging()service allows you to send messages through Firebase Cloud Messaging. The new service includes the
import * as admin from "firebase-admin") to not work properly.
auth/internal-errorerror now includes the raw server response to more easily debug and track down unhandled errors.
auth/internal-errorerror to be thrown when calling
getUserByEmail()for a user without a creation date.
auth/internal-errorerror to be thrown when calling
createUser()with an email that corresponds to an existing user.
auth/internal-errorerror to be thrown when calling Authentication methods with a credential with insufficient permission. Now, an
auth/insufficient-permissionerror will be thrown instead.
nullvalue for the
databaseAuthVariableOverrideproperty 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.
auth/invalid-uiderror to be thrown for valid
uidvalues passed to several Authentication methods.
BufferAPIs in Node.js
firebase-admin) is a new SDK which replaces and expands the admin capabilities of the standard
firebasenpm module. See Add the Firebase Admin SDK to your Server to get started.
npm-shrinkwrap.jsonfiles. This was fixed in version 4.0.1.
serviceAccountproperty of the options passed as the first argument to
initializeApp()has been deprecated in favor of a new
credentialproperty. See Initialize the SDK for more details.
admin.credential.cert()method allows you to authenticate the SDK with a service account key file.
admin.credential.refreshToken()method allows you to authenticate the SDK with a Google OAuth2 refresh token.
admin.credential.applicationDefault()method allows you to authenticate the SDK with Google Application Default Credentials.
deleteUser(). See Manage Users for more details.
createCustomToken()method is now asynchronous, returning a
Promise<string>instead of a