Add support for authentication
See original GitHub issueI’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:
- Created 8 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Firebase Auth support is coming in ReactFire
2.0.0
. Check out https://github.com/firebase/reactfire/pull/123.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.