Facebook as an OAuth Provider

Learn how to configure Facebook provider in the Single Sign-On with OAuth 2 add-on.

Olga Tereshina avatar
Written by Olga Tereshina
Updated over a week ago

To set up Facebook as an identity provider for the "Single Sign-On with OAuth 2" add-on, you will need a Facebook Login app. If you have it already configured in your Facebook Developer account, you will need only to connect it properly to your X-Cart-based store. However, if you don't have a configured Facebook Login app, you need to set it up.

Facebook Login App Creation

To create a Facebook Login app:

  1. Log in to your Facebook Developer account.

  2. Click Create App button.

  3. Select the "Build Connected Experience" option and complete the app creation procedure following the regular steps.

  4. Open the app Settings -> Basic page to get your App ID and App Secret and specify your store URL in the App Domains field.

    Please also don't forget to fill in the Privacy Policy URL, Terms of Service URL, and Category fields. You will this to go live with your app.

  5. In the Products -> Facebook login menu, open the Settings page. Here you need to specify the Valid OAuth Redirect URIs value.
    It should be like https://your_xcart_based_store_url/?target=oauth2return&provider=facebook

  6. Make your app live by switching the In development toggle to Live.

Facebook Identity Provider Setup

To set up the Facebook identity provider in X-Cart:

  1. First, on the Providers page of your store's Admin area (Store Setup -> Providers), open the Facebook provider details page and configure the general settings as described here.

  2. Proceed to Settings. Paste the Facebook Login app App ID and App Secret data in the relevant fields.

  3. Click Update to complete the provider setup in your store Admin area.
    Login with Facebook comes configured and enabled as a result.

The Facebook login icon will appear:

  • in the storefront header;

  • on the checkout page.


When a buyer clicks this icon to sign-up in your store, the "Log in to Facebook" form appears where they can sign in with an existing Facebook account.

Your online store registers this information and records it in the related customer account (the Social Accounts tab).

A new customer account is created if this is a buyer's first-time sign-up, provided the "Single Sign-On with OAuth 2" add-on is configured accordingly.

Related pages:

Did this answer your question?