Search Results :

×

Facebook OAuth & OpenID connect Single Sign-On (SSO) | Facebook SSO Login

Facebook OAuth & OpenID connect Single Sign-On (SSO) | Facebook SSO Login



Setting up Facebook Social Media Login on WordPress (Facebook SSO) using OAuth2 is easy with WordPress OAuth / OpenID Connect Single Sign-On (SSO) plugin. You can configure plugin using different other Social Media providers / custom OAuth and OIDC providers. It supports advanced Single Sign-On (SSO) features such as user profile Attribute mapping, Role mapping, etc. Here we will go through a guide to configure SSO between WordPress and Facebook. By the end of this guide, users should be able to login to WordPress from Facebook. To know more about other features we provide in WP OAuth Single Sign-On ( OAuth & OpenID Connect Client ) plugin, you can click here.


Pre-requisites : Download And Installation


  • Log into your WordPress instance as an admin.
  • Go to the WordPress Dashboard -> Plugins and click on Add New.
  • Search for a WordPress OAuth Single Sign-On (SSO) plugin and click on Install Now.
  • Once installed click on Activate.


Steps to configure Facebook Single Sign-On (SSO) Login into WordPress

1. Setup Facebook as OAuth Provider

  • To get started, Go to Facebook developers console click here and sign up/Login with your facebook developer account.
  • facebook wp developer login app
  • Go to the Facebook Developers apps page and click the button to Add New App.
  • facebook wp social login create facebook app
  • Select the options as your need to create an AppID.
  • social login facebook wp social login app options
  • Enter the App Display Name and Add Contact Email for your Facebook app respectively then click on Create App button to save your settings and create an App Id for your app and complete the Security Check.
  • facebook social login app wp detials
  • Select Facebook Login by clicking on the Set Up button .
  • facebook social login wordpress facebook setup
  • Select the Web option as you are trying to integrate your Facebook Login with a website.
  • wordpress social login facebook login select web option
  • Next, enter the Site URL (from your miniOrange social login plugin WordPress) and click Save. Then, click Continue.
  • facebook wordpress login site URL facebook SSO
  • Now, click on the Settings option what you find on the left side, under Products – Facebook Login. Into the Valid OAuth redirect URIs field add the Redirect/Callback URL which you will get from the OAuth Single Sign-On (SSO) plugin. Click on Save changes button.
  • facebook wordpress login site URL facebook SSO
  • Go to Settings -> Basic to view your App Id and App Secret (Refer to the image below).
  • App Domain: Write your website’s domain there.
  • Privacy Policy URL: Fill in this box with the URL liked to your website’s privacy policy page.
  • Terms of Service: Fill in this box with the URL linked to your website’s terms of service page.
  • User Data Deletion:drop down, Select Data Deletion Instruction URL (Enter the URL of your page with the instructions on how users can delete their accounts on your site).
  • Choose a category from the dropdown in the Category field and pick the App Purpose option that describes your App the best, then press Save Changes to save your configurations.
  • fb wp social login facebook basic info
  • Click on the App review tab from the left hand side menu and click on Permissions and Request.
  • facebook social login app review tab permissions
  • Click on Request Advance Access for public_profile and email. If you want any extra data to be returned you can request permission for those scopes.
  • social login facebook request advance access
  • 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.
  • social login facebook developer status
  • NOTE:- If you are asked to complete Data Use Checkup. Click on start Checkup Button.
  • facebook social login complete data checkup
  • Certify data use for all the Enabled Advanced permission. Click on submit button.
  • facebook social login enable advance permission facebook social login submit data checkup

You have successfully configured Facebook as Social Login (OAuth Provider) into your WordPress Site.


2. Setup WordPress as OAuth Client


  • Go to Configure OAuth tab and click Add New Application to add a new client application into your website.
  • Facebook Single Sign-On (SSO) OAuth - Add new application
  • Choose your Application from the list of OAuth / OpenID Connect Providers, Here Facebook
  • Facebook Single Sign-On (SSO) OAuth - Select Application
  • Copy the Callback URL to be used in OAuth Provider Configuration. Click Next.
  • Facebook Single Sign-On (SSO) OAuth - Callback URL
  • Please refer the below table for configuring the endpoints for Facebook in the plugin.

    App Name: Facebook
    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
    Scope: public_profile email
  • Facebook Single Sign-On (SSO) OAuth - Add App name, TenantID
  • Enter the Client Credentials like Client ID & Client Secret as shown in the setup dialogue box, identify email is already filled. Click Next.
  • Facebook Single Sign-On (SSO) OAuth - Client ID & Client Secret
  • Click on Finish to save the configuration.
  • Facebook Single Sign-On (SSO) OAuth - Finish configuration

You have successfully configured WordPress as OAuth Client for achieving user authentication with Facebook Single Sign-On (SSO) login into your WordPress Site.


3. User Attribute Mapping

  • User Attribute Mapping is mandatory for enabling users to successfully login into WordPress. We will be setting up user profile attributes for WordPress using below settings.
  • Finding user attributes

    • Go to Configure OAuth tab. Scroll down and click on Test Configuration.
    • Facebook SSO test configuration
    • You will see all the values returned by your OAuth Provider to WordPress in a table. If you don't see value for Email or Username, etc. make the required settings in your OAuth Provider to return this information.
    • Once you see all the values in Test Configuration, go to Attribute / Role Mapping tab, you will get the list of attributes in a Username dropdown.
    • Facebook SSO attribute mapping

4. Sign In Settings

  • The settings in Single Sign-On (SSO) Settings tab define the user experience for Single Sign-On (SSO). To add a Facebook login widget on your WordPress page, you need to follow the below steps.
    • Go to WordPress Left Panel > Appearances > Widgets.
    • Select miniOrange OAuth. Drag and drop to your favourite location and save.
    •  Facebook  Single Sign-on (SSO) - WordPress create-newclient login button setting
    • Go to WordPress Left Panel > Appearances > Widgets.
    • Select miniOrange OAuth. Drag and drop to your favourite location and save.
    • Facebook Single Sign-on (SSO) - WordPress create-newclient login button setting
    • Open your WordPress page and you can see the Facebook SSO login button there. You can test the Facebook Single Sign-On (SSO) now.
    • Make sure the "Show on login page" option is enabled for your application. (Refer to the below image)
    • Facebook Single Sign-on (SSO) - WordPress create-newclient login button setting
    • Now, go to your WordPress Login page. (Eg. https://< your-wordpress-domain >/wp-login.php)
    • You will see an Facebook SSO login button there. Once you click the login button, you will be able to test the Facebook Single Sign-On (SSO).
    • Facebook Single Sign-on (SSO) - WordPress create-newclient login button setting

In this Guide, you have successfully configure Facebook Single Sign-On (SSO) by configuring Facebook as OAuth Provider and WordPress as OAuth Client using our WP OAuth Single Sign-On ( OAuth & OpenID Connect Client ) plugin. This solution ensures that you are ready to roll out secure access to your WordPress site using Facebook login credentials within minutes.

Additional Resources


Mail us on oauthsupport@xecurify.com for quick guidance(via email/meeting) on your requirement and our team will help you to select the best suitable solution/plan as per your requirement.

Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com