Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Set up Google and Facebook SSO

Describes how to configure Google and Facebook SSO.

Configured Commerce supports Google and Facebook SSO (as external login providers) out-of-the-box.

Configure Google/Facebook logins

These logins are enabled by setting the following Settings in the Admin Console. Changes to these settings will not take place until after the application pool has been recycled.

Setting Value TypeDescription
Allow Sign in with Facebook Accounttrue/falseIf true, a Facebook button will appear on the sign in page.
Facebook App IDstringThe app id identified by your Facebook application used for Facebook login.
Facebook App SecretstringThe app secret identified by your Facebook application used for Facebook login.
Allow Sign in With Google Accounttrue/falseIf true, a Google button will appear on the sign in page.
Google_Client IDstringThe client id identified by your Google application used for Google login.
Google Client SecretstringThe client secret identified by your Google application used for Google login.

Set up a Google Application to generate a ClientId and ClientSecret

  1. In a browser navigate to https://console.developers.google.com (log in if you are not logged in already)
  2. Go to the API Manager > Credentials
  3. Click New credentials and select OAuth 2.0 client ID
  4. Select Web Application
  5. Name the application (This will be displayed when users are redirected to Google to login. Once they log in, it will prompt the users and say "{application name} would like to access your profile" or something like that).
  6. Set the Authorized JavaScript origins to the website URL
  7. Set the following redirect URLs to the following, replacing the mywebsite part:
    https://www.mywebsite.com/identity/externalcallback
    https://www.mywebsite.com/identity/signin-google
  8. Click Create
  9. You should now have the clientid and clientsecret.
  10. Go to the Overview tab
  11. In the Social APIs section click on Google+ Api and enable it.
  12. Enter clientid and clientsecret within the Google External Provider Settings

Set up a Facebook application to generate an AppId and AppSecret

  1. In a browser navigate to https://developers.facebook.com/ (login if you are not logged in already)
  2. Select My Apps in the header and select Add an app
  3. Select WWW
  4. Name the application (This will be displayed when users are redirected to Google to login. Once they log in, it will prompt the users and say "{application name} would like to access your profile" or something like that).
  5. Select a category and create the app.
  6. Enter your website and click Next
  7. Refresh the page
  8. In the header select My Apps and the app you just created.
  9. Click Settings to see your app id and app secret
  10. Under Settings set the contact email
  11. Under the Status and Review section, set your app to be Live
  12. Then in the same section, enable the email and public_profile items
  13. Verify on the Dashboard that the API version is 2.5.

After everything is configured, restart the IIS App Pool to enable the new configuration.