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.

Add support for authentication

See original GitHub issue

I’m fairly new at React, so this could be the wrong design entirely, but:

It looks like a good way to handle authentication is to write:

componentWillMount() {
  firebaseRef.onAuth(auth => this.setState({auth: auth}));
},
componentWillUnmount() {
  firebaseRef.offAuth(...);
},

It would be nice if ReactFire would handle dropping the current authentication state into a component’s state, instead of needing this custom code.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
jwngrcommented, Feb 27, 2017

Firebase Auth support is coming in ReactFire 2.0.0. Check out https://github.com/firebase/reactfire/pull/123.

1reaction
jwngrcommented, Sep 21, 2015

That definitely does seem like a good way to handle Firebase Authentication state. I don’t think it’s worth putting in ReactFire proper though. It already is only two lines of code and I don’t think the addition of the other user management methods really adds much to the library. It makes sense in AngularFire since we promisify the API and handle the digest loop for you automatically. Those don’t seem like huge selling points in React (especially the digest loop one). So, I think for now we’ll keep ReactFire minimal and not include authentication.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add Step-up Authentication - Auth0
You can add step-up authentication to your app with Auth0's extensible multi-factor authentication (MFA) support. Your app can verify that the user has ......
Read more >
Overview of ASP.NET Core Authentication - Microsoft Learn
The Authentication middleware is added in Program.cs by calling UseAuthentication. Calling UseAuthentication registers the middleware that uses ...
Read more >
How to Fix Support for password authentication was removed ...
Click on your GitHub profile icon on the top right corner · Click Settings · From the menu shown on the left, click...
Read more >
The 'support for password authentication removed' GitHub error
Steps to fix GitHub's 'support for password authentication was removed' error · Log into GitHub with your username and password · Navigate to...
Read more >
Choosing an Authentication Method | Cloud Endpoints with ...
Cloud Endpoints supports multiple authentication methods that are suited to different applications and use cases. The Extensible Service Proxy (ESP) uses ...
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