nestjs-firebase-admin | NestJS Module for Firebase Admin SDK | Authentication library
kandi X-RAY | nestjs-firebase-admin Summary
kandi X-RAY | nestjs-firebase-admin Summary
NestJS Module for Firebase Admin SDK
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nestjs-firebase-admin
nestjs-firebase-admin Key Features
nestjs-firebase-admin Examples and Code Snippets
Community Discussions
Trending Discussions on nestjs-firebase-admin
QUESTION
I was checking one of the nestjs module's source code (nestjs-firebase-admin) and I saw something weird. In this line:
...ANSWER
Answered 2021-Apr-12 at 18:29When we use useFactory
we are telling Nest function should be called when the ProviderService
(whatever that injection token may be) is used in the application for injection. It looks like the reason for this is that app
is not an immediately injectable value (this can be fixed by making it a custom provider, but I guess the nestjs-firebase-admin
team thought this was an easier solution). So instead of having injection errors about not being able to inject app
automatically, the firebase-admin team decided to instantiate the providers themselves. This is a perfectly valid approach as well, and the reason things like useFactory
exists (though, they could have easily used useValue: new ProviderService(app)
and avoided the function all). It's just another way to do things
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nestjs-firebase-admin
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page