@ecobee/nestjs-firebase-admin v3.0.2
Nestjs adaptor module for Firebase Admin
Description
Firebase Admin Module for Nest.js Framework
Unlike the original module, this module uses npm
in place of yarn
.
Requirements
Requires node ^18.12.x, npm ^8.19.x.
Installation
$ npm i ecobee/nestjs-firebase-admin
Import module
import { Module } from '@nestjs/common';
import { FirebaseAdminModule } from '@aginix/nestjs-firebase-admin';
import * as admin from 'firebase-admin';
@Module({
imports: [
FirebaseAdminModule.forRootAsync({
useFactory: () => ({
credential: admin.credential.applicationDefault(),
}),
}),
],
})
export class AppModule {}
Usage
Inject Authentication Service
import { Injectable } from '@nestjs/common';
import { FirebaseAuthenticationService } from '@aginix/nestjs-firebase-admin';
@Injectable()
export class AppService {
constructor(private firebaseAuth: FirebaseAuthenticationService) {}
getUsers() {
return this.firebaseAuth.listUsers();
}
}
Compatibility Table
firebase-admin | NestJS Library |
---|---|
9.xx | main |
8.xx | 1.xx |
Pull requests
When making a pull request for the library ensure the built /dist
folder is included by running npm run build
Change Log
3.01
Initial ecobee release
3.02
Upgrade firebase-admin
Publishing to NPM
To publish to npm, you will need to set the NPM_TOKEN
env var. This value can be found in your npm config (likely either ~/.config/npm/npmrc
or ~/.npmrc
)
License
Original MIT License
MIT © Aginix Technologies Co., Ltd.
Custom License for Modifications
The modifications to this code are proprietary and restricted to ecobee. Unauthorized distribution, copying, or modification of these modifications is prohibited.
Pull Requests are welcome.
The original code is licensed under the MIT License, which can be found in the LICENSE file.