I have a unique situation where the database isn't known at the time of authentication. To get around this, I utilize a rest endpoint that accepts an Authorization header with the email and password. All accounts are stored in a main database and the accounts are mapped to a key that holds the database information for where the customer's data resides. They way it works is I authenticate the user, lookup the db info, connect to the customer's db and generate a custom token. I return the token along with the config info so I can call initializeApp and execute signInWithCustomToken.
The problem I have is that AngularFireAuth has a constructor that requires the app. Because of this, I can't pass AngularFireAuth in the constructor of my auth.service where I would map to the authState observable.
Anyone have any ideas?
Thanks