You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 17, 2024. It is now read-only.
I've incorporated Firebase Auth into my NestJS product. It requires firebase-admin and I include like such:
main.ts
import{NestFactory}from"@nestjs/core";import{AppModule}from"app.module";import*asadminfrom"firebase-admin";/** * If there comes a time that we want to exclude "api" prefix * from certain controllers, then refernce this answer: * * https://github.com/nestjs/nest/issues/255#issuecomment-360749246 * * Otherwise, this functionality doesn't exist atm. * I think it is actively being discussed/worked on though */asyncfunctionbootstrap(){constapp=awaitNestFactory.create(AppModule);app.setGlobalPrefix("api");// Redacted the URL and credential for our purposes hereadmin.initializeApp({credential: <CREDENTIAL_CERT>,databaseURL: <DATEBASE_URL>});awaitapp.listen(5000);}bootstrap();
Everything works fine, but then I came across this npm library.
Is there a benefit to using your method over what I did above? Is your method explicitly for baking firebase-admin into the dependency injection flow?
imjared, Ruslancic, icecoconut, RoyBkker, istiyak-iroid and 1 more