Does anyone know is it possible to intercept the requests made to firebase cloudstore with AngularFire library ?
I would like to implement a functionality that shows a toast message in the angular interceptor when adding/updating/deleting items from the cloudstore
I am using AngularFire library and AngularFirestore.
My interceptor works fine for other http requests but not when when using the library only using the angular builtin HttpClient library. I can see in the network console that xhr request are made when adding/updating/deleting items from cloudfirestore.
How can I intercept the requests made from AngularFirestore library ?
I am using @angular/fire 5.1.2 and angular 7.2
Thanks, Jani
The Angular interceptor only works for http request made with the http client. AngularFire uses the Firebase SDK for Firestore operations, which does not use the http client from Angular. So the requests can not be intercepted.
You could send a message inside the function which calls the operation. Or use background functions from Firebase Cloud Function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With