I’m trying to use two Firebase instances in my Angular project. I found some articles regarding the usage of InjectionToken but I’m wondering if there is a more straightforward solution. In app.module.ts I initialize the app and provide FirebaseApp and Firestore. Is there any possibility of initializing two apps and providing them both to FirebaseApp and Firestore? I have a const environment that keeps the two configurations: firebaseOne and firebaseTwo. Is there any solution? For now, inside my app.module.ts in imports, I have this:
imports: [
//... code
AngularFireModule.initializeApp(environment.firebaseOne),
provideFirebaseApp(() => initializeApp(environment.firebaseOne)),
provideFirestore(() => getFirestore()),
],