AWS Mobile
Developer Guide

Create a Google Developers Project and OAuth Web Client ID

To enable Google Sign-In in your mobile or web app, create a project in the Google Developers Console. If you are making versions of your mobile app for more than one platform (iOS, Android, or web), create a single Google project to manage Google authentication for all of the platform instances.

For all platforms, enable the Google+ API for and an OAuth web client ID for your Google project. Amazon Cognito federates the web client ID to enable your app(s) to use Google authentication to grant access to your AWS resources.

To create a Google Developers project and OAuth web client ID

  1. Go to the Google Developers Console at https://console.developers.google.com.

  2. If you have not created a project yet, choose Select a project from the menu bar, and then choose Create a project....

    
                  Choosing Create a New Project in the Google Developers Console
  3. Complete the form that is displayed to create your new project.

  4. In the Dashboard for your project, go to the Use Google APIs section and then choose Enable and manage APIs.

    
                  Choosing Enable and manage APIs for Google API in the Google Developers Console
  5. In the API Manager, in the Social APIs section, choose Google+ API.

    
                  Choosing Google+ API to enable it in the Google Developers Console
  6. In the Overview for Google+ API, choose Enable API.

    
                  Enabling the Google+ API for a new app in the Google Developers Console
  7. A message appears to inform you that the API is enabled but that it requires credentials before you can use it. Choose Go to Credentials.

    
                  Adding Credentials to the enabled Google+ API in the Google Developers Console
  8. Your Mobile Hub sample app authenticates users through Amazon Cognito Identity, so you need an OAuth web application client ID for Amazon Cognito. In Credentials, choose client ID from the links in the first step.

    
                  Choosing to add client ID credentials for the Google+ API in the Google Developers Console
  9. A message appears to inform you that you must set a product name. Choose Configure consent screen.

    
                  Configuring the consent screen for client ID credentials in the Google Developers Console
  10. In OAuth consent screen, enter the name of your app in Product name shown to users. Leave the remaining fields blank. Then choose Save.

    
                  Providing a name for a new app in the OAuth consent screen in the Google Developers Console
  11. In Create client ID, choose Web application.

    
                  Creating a client ID for a web application in the Google Developers Console
  12. In Name, enter a name for the web client credentials for your app. Leave the Authorized JavaScript origins and Authorized Redirect URIs fields blank. Mobile Hub configures this information indirectly through Amazon Cognito Identity integration. Choose Create.

    
                  Naming newly created web application credentials in the Google Developers Console
  13. In the OAuth client pop-up, copy and save the value that was generated for your client ID. You need the client ID to implement Google Sign-In in your Mobile Hub app. After you copy the client ID, choose OK.

    
                  Displaying the generated client ID in the Google Developers Console
  14. Paste the web application client ID value into the Mobile HubGoogle Web App Client ID field for your project.

    
                  Where to paste the web application client ID value from Google into the |AMH| console