Google+ Social Login Configuration Guide


Google+ is a social networking site operated by the people who bring you the Google search engine.

Before You Begin

To use Google+ for social login you must:

  1. Obtain a Google developer account from https://console.cloud.google.com.
  2. Do one of the following:
    • Open a previously-created Google app, and copy the app ID and app secret.
    • Create a new Google app and copy the client ID and client secret.
       
  3. Use the Janrain Dashboard and the Google+ client ID and client secret to configure Google+ as a social login provider.

In This Configuration Guide

  • Creating a Google+ App for Social Login
  • Using an Existing Google+ App for Social Login
  • Configuring Google+ as a Social Login Provider
  • Testing Google+ Social Login
  • Assigning a Different Google+ App for Social Login
  • Removing Google+ as a Social Login Provider

Creating a Google+ App for Social Login

This section walks you through the process of creating a Google+ app for social login. If you already have an app, see the Using an Existing Google+ App for Social Login section of this documentation.

To create a Google+ app, complete the following procedure:

  1. Log on to the Google Cloud Platform Developers site (https://console.cloud.google.com).
  2. From your Cloud Platform Dashboard, click Go to APIs overview:

  1. On the Dashboard page, click Enable APIs and Services:

  1. On the API Library page, scroll down and then click Google+ API:

  1. On the Google+ API page, click Enable:

  1. From the Google+ API page, click Create credentials:

  1. On the Credentials page:
    • Click Which API are you using and then select Google+ API.
    • Click Where will you be calling the API from and then select Web browser (Javascript).
    • Under the label What data will you be using, select User data.
    • Click What credentials do I need.
  2. On the Add credentials to your project page:
    • Enter the URL of your website in the Authorized JavaScript origins field.
    • Enter your Google redirect URL in the Authorized redirect URIs field. If you are using a standard Janrain domain, your redirect URL will look similar to this: https://greg-stemp.rpxnow.com/google/callback.
    • Click Create Client Id.
  3. After the Add credentials to your project page updates:
    • Enter your email address in the Email address field.
    • Enter the display name of your app in the Product name shown to users field.
    • Click Continue.
  4. Click Download to download credentialing information for your app:

The credentialing information downloaded from Google will look similar to this:

  1. Copy and save the client_id (493091232151-4ks8jnplmho6pjigo9o3kjedft8v31jn.apps.googleusercontent.com) and the client_secret(KrED9ZUGXsKEWN0GOZUNOOIx). You can copy this information to a text editor, then close the text editor after you have configured Janrain social login.
  2. Click Done.
  3. Verify that credentials for your application have been created, and then log off of the Google Cloud Platform:


Using an Existing Google App for Social Login

If you already have a Google app that can be used for social login, complete the following steps to retrieve the application’s client ID and client secret:

  1. Log on to the Google Cloud Platform (https://console.cloud.google.com).
  2. From your Google Cloud Platform dashboard, click Go to APIS overview:

  1. From the APIs & services page, click Credentials:

  1. From the Credentials page, click the Name of your OAuth 2.0 client:

  1. From the Client ID for Web application page, copy the Client ID and Client secret, and then log off from the Google Cloud Platform:


Configuring Google+ as a Social Login Provider

To configure Google+ as a social login provider, make sure you have your Google+ client ID and client secret, then complete the following procedure:

  1. Log on to your Janrain Dashboard (https://dashboard.janrain.com).
  2. From the Dashboard home page, click the Manage Engage Dashboard icon.
  3. From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
  4. From the Sign-in page, verify that Widget is selected and then expand Providers.
  5. From the list of Providers, click Google+.
  6. In the Google+ dialog box, click Next until you reach the screen requesting the client ID and client secret:

  1. Paste your Google+ client ID in the Client ID field, paste your Google+ client secret in the Client Secret field, and then click Save. Google+ appears in your social login widget.
  2. When you are finished, select Save and Publish and then click Publish. It might take as long as one hour before Google+ appears as a social login option on your web site.

Testing Google+ Social Login

To test Google+ social login, complete the following procedure:

  1. Do one of the following:
    • If you have just published your widget settings, click the Test your widget link that appears after the widget has been saved.
    • If you previously published your widget settings then, from the Engage Dashboard Sign-in page, click Launch a test widget.
       
  2. From the Test page, click the Google+ icon:

  1. In the Sign in – Google Accounts window, logon using a valid Google+ account:

  1. If login succeeds, information returned from the Google+ profile is displayed in the API response preview field:

The returned profile information will vary depending on:

  • The Google+ account used in the test.
  • The profile information you requested for Google+.

You can verify Google+ profile fields by completing the following procedure:

  1. From the Engage Dashboard home page, click the Manage Providers icon:

  1. From the Configure Providers page, click Google+.
  2. Profile information returned from Google+ is displayed onscreen. For example:

Fields not marked with an Off or an Ask label are automatically returned when a user logs on using a Google+ account.

For fields that are marked with a label, click Off to request that the information be returned. The Off label will change to Ask, meaning that, at logon time, the user will be asked whether they give permission for that data to be returned:

For example, if you ask for a user’s email address during logon, he or she will see the following message before they log on:

The user can either click Allow to forward all the requested information, or can click Cancel to terminate logon.

On the Configure Providers page, click Ask to turn off the information request.

See Also


Assigning a Different Google+ App for Social Login

If you want to use a different Google+ app or if you need to change your existing app, you must update the Google+ provider configuration settings. To do that, complete the following procedure:

  1. From the Engage Dashboard home page, click the Manage Providers icon:

  1. From the Configure Providers page, click Google+.
  2. Click the green Configured button to display the Google+ is currently enabled dialog box:

  1. To change the Google+ configuration, click Modify these settings.
  2. In the Google+ dialog box, change the Client ID and/or Client Secret as needed, and then click Save:

Although you can modify your Google+ settings, you cannot delete those settings. If you delete the settings and then try to save your changes, you’ll see the error message Please enter your Consumer Key and Secret exactly as Google+ shows them.

This means that you cannot “unconfigure” the provider: once configured, the Google+ icon will always be shown as green (i.e., configured) in the Janrain Dashboard.


Removing Google+ as a Social Login Provider

If you no longer want to use Google+ for social login, you can remove Google+ as a social login provider by completing the following procedure:

  1. Log on to your Janrain Dashboard (https://dashboard.janrain.com).
  2. From the Dashboard home page, click the Manage Engage Dashboard icon.
  3. From the Engage Dashboard home page, in the Widgets and SDKs section, click Sign-Ins.
  4. From the Sign-in page, verify that Widget is selected and then expand Providers.
  5. In the widget, click the X in the upper right corner of the Google+ icon.
  6. Scroll to the bottom of the page, select Save and Publish, and then click Publish. Google+ no longer appears in the sign-on widget.
Note. You must always have at least one social login provider in the widget. If you delete all the providers and then click Publish, you’ll see the error message Couldn’t save configuration: No providers.