Before you can integrate Google Sign-In into your website, you must have a Google API Console project. In the project, you create a client ID, which you need to call the sign-in API.
To create a Google API Console project and client ID, follow these steps:
- Go to the Google API Console.
From the project drop-down, select an existing project, or create a new one by selecting Create a new project.
In the sidebar under "API Manager", select Credentials, then select the OAuth consent screen tab.
- Choose an Email Address, specify a Product Name, and press Save.
- In the Credentials tab, select the New credentials drop-down list, and choose OAuth client ID.
- Under Application type, select Web application. 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.
- Press the Create button.
- From the resulting OAuth client dialog box, copy the Client ID . The Client ID lets your app access enabled Google APIs.