Firebase Admin Module for Nest.js Framework
$ yarn add @aginix/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 |
master |
8.xx |
1.xx |