-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Support On-Demand Firebase SDK Auto-configuration #890
Comments
Apologies, I thought you were referring to the module bundling splitting, I'll have to give it a think of how we'd do it, but it would be awesome. |
I solved it with a (admittedly pretty ugly) workaround: In your <script>
window.firebase = { initializeApp: function(credentials) { window.firebaseCredentials = credentials} };
</script>
<script src="/__/firebase/init.js"></script>
<script>
window.firebase = undefined;
</script> This will save the credentials needed to initialize firebase to Then add the saved credentials to your AngularFireModule.initializeApp((window as any).firebaseCredentials) Maybe something that could be added to the docs? |
hello, any update on this? |
No update, happy to accept a PR; which is why I left this open. Continue configuring normally for now. |
I've been looking at where to possibly inject this in a way that is easy for users. I'd like it if it was an option to the I think that my solution posted above is a good fit for users who want to do this, and could probably be added (with some changes for clarity) to the docs. It will however slow down the loading of the app slightly (one more non-deferred network request) so I don't think it should be the default/preferred way of doing it. TL:DR; I don't think this is possible in a user-friendly way without changes to the firebase SDK to allow loading config async. |
Further, I don't think we can handle this easily with Angular Universal. I'm going to think on this more and will reconsider in the future. Closing for now. |
Any updates here? I think This is a huge update on security and I think we should discuss better on alternatives if it's not possible to implement @Maistho, what it |
Not sure if this is even possible with AngularFire2, but this was just released:
https://firebase.googleblog.com/2017/04/easier-configuration-for-firebase-on-web.html?m=1
At first glance it seems that the init would need to be able to support this new feature from Firebase.
The text was updated successfully, but these errors were encountered: