Quick start

Participate in the Alpha Group

All of the resources for this program are open to the public. However, we really want to hear from you. Our Alpha Group is a GitHub Discussion Board. Let us know about your thoughts and experience using the new SDK. What did you like? What went wrong? Let us know.

Installation

The experimental modular library is available on npm under the exp tag. All of the work done on the library is also public on GitHub as well.

To get the experimental library use the @exp tag.

npm i firebase-admin@exp
# OR
yarn add firebase-admin@exp

Initialization

This library has the same features and functionality as the existing Firebase Admin SDK, but the code has a different organization. Currently the library is set up with a "namespace" organization. This modular library still provides the default namespace for backwards compatibility. However, you can use named exports for a modular approach.

Note: This modular format is not optimized for tree-shaking (unused code removal) like the new web SDK. The modular Admin SDK provides function calls to get the Firebase service. However, methods are available on the service instead of individual functions like in the new web SDK.

import { initializeApp } from 'firebase-admin/app';
import { getAuth } from 'firebase-admin/auth';
const app = initializeApp();
// Access Firebase services
console.log(getAuth());

If you want a detailed explanation of why we made this change, check out the next section.