-
-
Notifications
You must be signed in to change notification settings - Fork 2
Migrations
In versions prior to 1.9.0, accessing the initialized admin.app.App instance directly from FirebaseProvider was not officially documented or type-safe.
In v1.9.0, FirebaseProvider exposes the app getter, allowing direct access to the app instance for integrating with other Firebase services (Firestore, Storage, Messaging, etc.).
// Old (workaround)
// const app = (provider as any).app;
// New (v1.9.0+)
import { getFirestore } from 'firebase-admin/firestore';
const app = provider.app;
const firestore = getFirestore(app);Using FirebaseGuard directly with @UseGuards is now deprecated in favor of the specialized decorators, which provide a cleaner and more consistent API.
Deprecated:
@UseGuards(FirebaseGuard)
@Get('r')
route() {}Recommended:
@Auth()
@Get('r')
route() {}In the next major version (v2.0.0), the FirebaseGuard class export may be removed or made internal. Please migrate to using @Auth() and @Roles() decorators.
GitHub Repository | Issues | Releases
If you find this project useful, you can support it by buying me a coffee ☕️. If you can't contribute financially, a ⭐ on the repo is also greatly appreciated!
MIT License © 2024 Tomás Alegre