This library provides authentication via Facebook's OAuth2 API. To install, run the following command in your terminal:
UsageFirst you need to get your "App ID" and "App Secret" from Facebook:
For the sign in process, the user is first directed to Facebook, where they are asked if they want to grant your website permission to see their information, then Facebook redirects them back to your website at the The When the user posts to http://localhost:3000/__/auth/facebook they will be re-directed to Facebook to complete the sign in. Facebook will then redirect them back to the Once
the user has successfully logged in, calling
APIConstructor
Options:
isCallbackRequest
Returns userCancelledLogin
Returns redirectToProvider
Redirect the user to Facebook with the appropriate parameters to request access to their profile. Options:
completeAuthentication
Verifies the supplied authentication info with Facebook and returns an Options:
callbackPathThe How can I login to Facebook in localhost?You need to register as facebook developer and create you app there. Once you have your web app registered you can go to your app and click on add product. Add Facebook Login. Then enable Web OAuth Login and add your localhost in the textfield below and save, you should be able to access it.
How would you test Facebook?Friends and their Timelines Test Cases for Facebook
Verify that the user can approve or decline received friend request. Verify that the user can unfriend any existing friend. Verify that users can see the timeline of their friends. Verify that users can post text in their friend's timeline.
Where is client OAuth settings in Facebook?In the App Dashboard, choose your app and scroll to Add a Product Click Set Up in the Facebook Login card. Select Settings in the left side navigation panel and under Client OAuth Settings, enter your redirect URL in the Valid OAuth Redirect URIs field for successful authorization.
How do I use OAuth on Facebook?Under Products in the App Dashboard's left side navigation menu, click Facebook Login, then click Settings. Verify the Valid OAuth redirect URIs in the Client OAuth Settings section. state . A string value created by your app to maintain state between the request and callback.
|