excited-coffeeE
Refine2y ago
4 replies
excited-coffee

Firebase integration

Wanted to make this thread to point a few things for future devs looking to use firebase with the recommended data provider from https://github.com/resulturan/refine-firebase
This repo is a little outdated and made for refine 3.x so to use it in 4.x you wither use legacyAuthProvider instead of the normal authProvider or fork the repo and make your own changes according to https://refine.dev/docs/migration-guide/auth-provider/#motivation-behind-the-changes which is the path i took.

Regarding firestore the basic getList, getOne etc. seem to be working but there are a lot of bugs if you want to use custom logic. These bugs come from trying to use the firestore module along with refine-firebase which don't seem to want to communicate ( trying to access database from refine-firebase and using custom functions).
What i ended up doing was importing any functions i needed like getCountFromServer or the aggregations form recent versions of firestore in the fork of refine-firebase and used it from there. My version of refine-firebase is @armable/refine-firebase using firestore 10.8.0.

Hope this saves other people some time at least in finding out what the error messages you keep getting are.
GitHub
Contribute to resulturan/refine-firebase development by creating an account on GitHub.
GitHub - resulturan/refine-firebase
Was this page helpful?