Guide to configure facebook as an OAuth Server



If you want users to login to your WordPress site using their Facebook credentials, you can simply do it using our WP OAuth Client plugin. Once you configure the Facebook with WordPress plugin, you can allow users to SSO to your WordPress site using Facebook.
Similarly, you can map your WordPress roles based on your Facebook attributes/groups. To know more about other features we provide in WP OAuth Client plugin, you can click here.

Follow the Step-by-Step Guide to configure Facebook as an OAuth Server :

  • First of all, Login/ Signup in Facebook developer console at https://developers.facebook.com/
  • fb1
  • Go to My apps -> Add New App.
  • fb2
  • Enter the Display Name and Contact Email for your facebook app under the Display Name and Contact Email fields respectively and then click on Create App ID button to save your settings and create an App Id for your app.
  • fb3
  • Select Facebook Login by clicking on the set up button .
  • fb4
  • Select Facebook Login -> Settings under Products option in the navigation bar .
  • fb5
  • Under Client OAuth Settings, enter the Callback/Redirect URL (from your miniOrange Oauth Client plugin) in the Valid OAuth Redirect URIs field. Click on the Save button to save your configurations.
    Most importantly, your Callback/Redirect URI should be https and not http. It is mandatory while configuring Facebook as an OAuth Server.
  • fb6
  • Go to Settings -> Basic to view your App Id and App Secret Refer to the image below).
  • fb7
  • Enter your Privacy Policy URL in the Privacy Policy URL field and choose a category from the dropdown in the Category field. Then, click on Save Changes button to save your configurations.
  • Copy your App ID and your App Secret and save it in your miniOrange OAuth Client Plugin/Module. (under client id and client secret field respectively).
  • fb8
  • Change you app status from In Development to Live by clicking on OFF as shown in the image below. Then, click on confirm to confirm your change of status.
  • fb9
  • You can download OAuth Client plugin using the following link.
    OAuth Single Sign On – SSO (OAuth client)

    Facebook Endpoints and Scope:

    Client ID: from the step 9 above
    Client Secret: from the step 9 above
    Scope: public_profile email
    Authorize Endpoint: https://www.facebook.com/dialog/oauth
    Access Token Endpoint: https://graph.facebook.com/v2.8/oauth/access_token
    Get User Info Endpoint: https://graph.facebook.com/me/?fields=id,name,email,age_range,first_name,gender,last_name,link

Free Trial

If you are facing any difficulty please mail us on info@xecurify.com.