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 Type | Description |
---|---|---|
Allow Sign in with Facebook Account | true/false | If true, a Facebook button will appear on the sign in page. |
Facebook App ID | string | The app id identified by your Facebook application used for Facebook login. |
Facebook App Secret | string | The app secret identified by your Facebook application used for Facebook login. |
Allow Sign in With Google Account | true/false | If true, a Google button will appear on the sign in page. |
Google_Client ID | string | The client id identified by your Google application used for Google login. |
Google Client Secret | string | The client secret identified by your Google application used for Google login. |
Set up a Google Application to generate a ClientId and ClientSecret
- In a browser navigate to https://console.developers.google.com (log in if you are not logged in already)
- Go to the API Manager > Credentials
- Click New credentials and select OAuth 2.0 client ID
- Select Web Application
- 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).
- Set the Authorized JavaScript origins to the website URL
- 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 - Click Create
- You should now have the clientid and clientsecret.
- Go to the Overview tab
- In the Social APIs section click on Google+ Api and enable it.
- Enter clientid and clientsecret within the Google External Provider Settings
Set up a Facebook application to generate an AppId and AppSecret
- In a browser navigate to https://developers.facebook.com/ (login if you are not logged in already)
- Select My Apps in the header and select Add an app
- Select WWW
- 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).
- Select a category and create the app.
- Enter your website and click Next
- Refresh the page
- In the header select My Apps and the app you just created.
- Click Settings to see your app id and app secret
- Under Settings set the contact email
- Under the Status and Review section, set your app to be Live
- Then in the same section, enable the email and public_profile items
- 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.
Updated over 1 year ago