Before we can use Google Plus for federated identity logins with Cognito, we need to follows these steps:
- Navigate to https://console.developers.google.com.
- Click Library on the left sidebar and accept the terms and conditions (of course after reading them) if displayed.
- Scroll down, Select Google+ API, and click Enable on the new page:
- Click on Credentials on the left sidebar menu, then click Create to create a new credential. If we have not created a project yet, this should show us a new project window:
- In the New Project window, do the following:
- Provide a Project Name
- Leave the default value for Location as it is
- Click the CREATE button
Now, click Create credentials in the Credentials popup:
- From the drop-down menu, select OAuth Client ID:
- There may be a warning message: To create an OAuth client ID, you must first set a product name on the consent screen:
- Click Configure consent screen to the right of it
- In the OAuth consent screen tab, do the following:
- Give an application name
- In the Authorized domains section, add a valid domain name:
-
-
- Click Save at the bottom of the form to save
-
- We will be redirected to the page for creating an OAuth client ID. Set Application Type as Web application and enter our domain under Authorized JavaScript origins:
- Click Create and we will be provided with a client ID: