question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initialize Firebase Authentication Providers

See original GitHub issue

Create an option initializeAuthProviders: true that would initialize each auth provider and inject it into the context as $fireAuthProviders.

Something like this:

/** Initialize Firebase Auth Providers */
const fireAuthProviders = {
  facebook: new firebase.auth.FacebookAuthProvider(),
  twitter: new firebase.auth.TwitterAuthProvider(),
  google: new firebase.auth.GoogleAuthProvider()
}
inject('fireAuthProviders', fireAuthProviders)

Maybe with an option to specify which auth providers should be initialized, e.g.:

initializeAuthProviders: ['facebook','twitter']

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
lupascommented, Mar 16, 2020

@krystian50

We don’t specifically talk about it in the docs because using this module does not really change anything when it comes to Auth Providers. How to access FirebaseAuth and it’s object is described here.

You access the Firebase Auth instance with this.$fireAuth and the auth object itself with this.$fireAuthObj.

So you can do the following:

const provider = new this.$fireAuthObj.GoogleAuthProvider()
await this.$fireAuth.signInWithRedirect(provider)

Notice the Obj.

2reactions
dosstxcommented, Jul 30, 2020

Another vote for updating the docs to include the above comments. I had to search around a bit. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get Started with Firebase Authentication on Websites
Add and initialize the Authentication SDK; (Optional) Prototype and test with Firebase Local Emulator Suite; Sign up new users; Sign in existing users ......
Read more >
Firebase Authentication using Provider in Flutter
Let's implement firebase auth with the provider and learn how to code better ... Let's create a separate class to initialize all the...
Read more >
Authentication
Initialization · Auth state listener · Sign-in with Email and Password · Sign-up with Email and Password · Send password reset · Send...
Read more >
Firebase Authentication and keeping users logged in with ...
Always ensure that you initialize your Providers in the root widget (top of the widget tree to be more precise) so that they...
Read more >
Getting Started with Firebase for the Web - Authentication
Firebase Authentication web example covering how to get started with Firebase web authentication services including an example of using Firebase ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found