mikkopaderes / ember-firebase-service

Exposes a service that's a direct representation of Firebase
MIT License
4 stars 2 forks source link

new firebase.auth.TwitterAuthProvider(); #15

Closed MatthewPringle closed 5 years ago

MatthewPringle commented 5 years ago

Thanks for this service, I have just started looking into it.

I am wondering how I can go about accessing functionality like

new firebase.auth.TwitterAuthProvider();

I can access the global firebase module, but I would rather do it within the service if possible?

mikkopaderes commented 5 years ago

It's not possible as the service is the direct representation of firebase.app.App.

DavidPhilip commented 3 years ago

Does this mean you have to import firebase via auto-import in order to use these AuthProviders? If yes, this isn't practical in terms of payload for these use-cases, right?

mikkopaderes commented 3 years ago

Does this mean you have to import firebase via auto-import in order to use these AuthProviders? If yes, this isn't practical in terms of payload for these use-cases, right?

Not via autoimport, but instead you have to bundle firebase-auth in your ember-cli-build.js as indicated in the README. Then you would need to do:

import firebase from 'firebase/app';

const foo = new firebase.auth.TwitterAuthProvider();

I don't quite understand what you mean that it's not practical. There's really no going around it, you have to include firebase-auth in your builds in order for it to be sideloaded in your firebase instance.

DavidPhilip commented 3 years ago

I don't quite understand what you mean that it's not practical. There's really no going around it, you have to include firebase-auth in your builds in order for it to be sideloaded in your firebase instance.

I think I misunderstood how it works then, thanks for explaining again 🙏