The Authorization Provider page allows staff users to configure alternate means to register for or log in to a Community Portal.

Salesforce will only allow one email per user. Therefore, a unique email must be used for each federated login. Otherwise, an Error page will display notifying the user that the authentication attempt has failed.

Configure Google as an Authorized Provider:

  1. Navigate to and log in to an existing Google account.

  2. From the top right of the window, click the Select a Project dropdown. This will open the Select modal.

  3. Select your Organization from drop down, and select the desired Project. If no project currently exists, click the button and configure the New Project settings.

  4. Under APIs and auth, click Credentials, which will display the Auth Credentials.

  5. If this is a new project, click Create new Client ID and select Web application as the Application Type, and then click Configure consent screen.

  6. Populate the desired fields below:

    1. Required Fields:

      • Email Address

      • Product Name

    2. Optional Fields:

      • Homepage URL

      • Product logo

      • Privacy policy URL

      • Terms of service URL

      • Google+ page ID

    3. Click Save when done.

  7. Type the Authorized JavaScript origins and click Create Client ID.

  8. Once the Client ID is created, open up a new tab and log in to Salesforce.

  9. Click Setup.

  10. Under the Administer heading, expand Security Controls and click Auth. Providers.

  11. On the Auth. Providers page, click the New button.

  12. From the Provider Type picklist, select Google.

  13. Populate the desired fields below:

    1. Required Fields:

      • Name- Enter a unique, identifying name for the Auth. Provider.

      • URL Suffix- Enter a value to use in the callback URL. This field will default to the value entered in the Name field.

      • Consumer Key- Paste the Client ID returned in earlier in the process.

      • Consumer Secret- Paste the Client Secret  returned in earlier in the process.

    2. Optional Fields:

      • Default Scopes- Enter the level of access that this user has to that profile, i.e., read-only access or profile email openid. Otherwise, the field will default to Salesforce.

      • Custom Error URL- Enter a URL to display a custom error message.

      • Custom Logout URL- Enter a URL to display a logout error message

      • Registration Handler- Enter "GoogleAuthRegHandler" into the lookup.

      • Execute Registration As- Enter the name of a full user in the system associated to a Role. Cannot be a Community User.

      • Portal- Leave as "None."

      • Icon URL- Enter a secure URL to the icon, or choose from among Google's sample icons.

      The Auth. Provider record populates the Client Configuration fields:

      • Test-Only Initialization URL

      • Single Sign-On Initialization URL

      • Existing User Linking URL

      • OAuth-Only Initialization URL

      • Callback URL

  14. Copy the Callback URL and navigate to the Google Developers Console tab in the browser window

  15. Click the Edit Settings button. Paste the Callback URL into the Authorized redirect URIs field and click Update.

  16. Next step is to Enable Social Login.

  17. Click Setup.

  18. In the Quick Find Field, search Sites. 

  19. Under the Digital Experiences heading, select All Sites.

  20. Click Workspaces link next to the intended Community. This will open a new Community Workspaces tab. 

  21. The the My Workspaces section, click Administration.

  22. From the left nav, click Login & Registration.

  23. From the Login & Registration page, check the Google checkbox and click Save.

  24. Open a new tab, navigate to the Communities app in Salesforce, and select the Sites tab.

  25. Navigate to the Community's related Site record and click Edit.

  26. Select the Auth Provider Default Account using the lookup.

  27. Copy the Single Sign-On Initialization URL generated during the Auth. Provider configuration and paste it into the Google Login URL field.

  28. Click Save.

Authenticated and unauthenticated users can log in to the Community Portal through their Google accounts.