Firebase Admin Module for Nest.js Framework
Unlike the original module, this module uses npm
in place of yarn
.
Requires node ^18.12.x, npm ^8.19.x.
$ npm i ecobee/nestjs-firebase-admin
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 {}
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();
}
}
firebase-admin | NestJS Library |
---|---|
9.xx |
main |
8.xx |
1.xx |
When making a pull request for the library ensure the built /dist
folder is included by running npm run build
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
)
MIT © Aginix Technologies Co., Ltd.
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.