Description
react-facebook-auth is a React component for Facebook login. It lets a developer receive a Facebook authentication token that a backend service can then use. You pass your Facebook application ID, a comma-separated scope of extended permissions, the fields to request, which default to name, email and picture, and a callback that runs when Facebook responds. An onFailure handler runs when a request fails. Other props control whether the person must authenticate again or be asked again for revoked permissions, the Facebook SDK version, which defaults to 2.8, the language, which defaults to en_US, the redirect URI, and whether redirects are disabled. A returnScopes option returns the granted scopes in the response, and a component prop lets you supply your own button element. The README links to a full example in the examples directory. The package is MIT licensed, and its source is public on GitHub.…
Highlights
- Gets a Facebook token for a backend service
- Custom button through the component prop
- Scope and fields to request
- Option to return the granted scopes
- MIT license
Ratings & Reviews
No ratings yet
Be the first to rate react-facebook-auth.
People also visit
react-facebook-auth FAQ
What does react-facebook-auth do?
It runs Facebook login in a React app and gives you a token that a backend service can use.
What do I need to start?
A Facebook application ID from the Facebook developers site, which the README links to.
Which props set the permissions?
scope takes a comma-separated list of extended permissions, and fields sets the profile fields, which default to name, email and picture.
Can I use my own button?
Yes. Pass a custom React element that returns a button in the component prop.
What license is it under?
MIT, as stated in the README.
What are the best react-facebook-auth alternatives?
Popular alternatives to react-facebook-auth include react-facebook-login, react-simple-oauth2-login and @react-oauth/google. See all react-facebook-auth alternatives



















