Set up Google Sign-In for Google+
To allow users to sign in, integrate Google Sign-In into your website. When you set up Google Sign-In for your site, also do the following:
When you configure the sign-in button, request the following scopes:
If you create a sign-in button with your own assets, keep in mind the branding guidelines. In particular, when you request social scopes, you should use a red sign-in button with the Google+ logo.
Enable the Google+ API
Enable the Google+ API by following these steps:
- Go to the Google Developers Console .
or create a new one by clicking Create Project:
Note: Use a single project to hold all platform instances of your app (Android, iOS, web, etc.), each with a different Client ID.
- In the Project name field, type in a name for your project.
- In the Project ID field, optionally type in a project ID for your project or use the one that the console has created for you. This ID must be unique world-wide.
- Click the Create button and wait for the project to be created.
- Click on the new project name in the list to start editing the project.
- In the left sidebar, select the APIs item below "APIs & auth". A list of Google web services appears.
- Find the Google+ API service and set its status to ON—notice that this action moves the service to the top of the list. You can turn off the Google Cloud services if you don't need them. Enable any other APIs that your app requires.
In the sidebar under "APIs & auth", select Consent screen.
- Choose an Email Address and specify a Product Name.
- In the sidebar under "APIs & auth", select Credentials.
Click Create a new Client ID — a
dialog box appears.
Register the origins from which your app is allowed to access the Google APIs, as follows. An origin is a unique combination of protocol, hostname, and port.
- In the Application type section of the dialog, select Web application.
for your app. You can enter multiple origins to allow for your app to run on different
protocols, domains, or subdomains. Wildcards are not allowed. In the example below,
the second URL could be a production URL.
- Click the Create Client ID button.
- In the resulting Client ID for web application section, copy the Client ID and Client secret that your app will need to use to access the APIs.