-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: change Firebase project at runtime #653
Comments
This would be great for apps supporting multiple languages with different Firebase projects for each language. We have an app built this way at the moment, which we are not able to deploy Firebase Authentication to until this is supported. |
I second this! |
I have made an implementation for this for the Authentication Plugin, see the fork here: Currently tested for iOS and Android, and seems to work as expected! Usage example:
After the apps have been initialized and @robingenz Let me know if you have any further requirements before we make a PR for this issue, it's a simple but effective solution at least :) |
@emmernme I like the approach. However, I would not add this code to the Capacitor Firebase Authentication plugin, but to the Capacitor Firebase App plugin (except for the |
Thanks! I think it does need to be in each of the plugins too, in order to actually use the selected app, unless the plugins communicate with each other at all on the native side? I'm not sure how we could implement this in the Firebase App-plugin and still use it with Firebase Authentication otherwise. Also, I think it's a good approach to allow using different projects for the different plugins, as this covers our specific use case and some others that I've researched :) |
Yes, but only the methods for selecting the Firebase project. The initialization of the Firebase app should be done by the Firebase app plugin. |
Good point – I'll make the changes and a PR! |
Allow changing the firebase project to runtime, see https://stackoverflow.com/a/41305288/6731412
The text was updated successfully, but these errors were encountered: