探索,發現,愛好、學習,記錄,分享。
學海無涯,天涯若比鄰,三人行,必有我師。

Creating a Google API Console project and client ID

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:

  1. Go to the Google API Console .
  2. From the project drop-down, select an existing project , or create a new one by selecting Create a new project.

    Note: Use a single project to hold all platform instances of your app (Android, iOS, web, etc.), each with a different Client ID.

  3. In the sidebar under “API Manager”, select Credentials, then select the OAuth consent screen tab.

    1. Choose an Email Address, specify a Product Name, and press Save.
  4. In the Credentials tab, select the New credentials drop-down list, and choose OAuth client ID.
  5. 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.

    1. In the Authorized JavaScript origins field, enter the origin for your app. You can enter multiple origins to allow for your app to run on different protocols, domains, or subdomains. You cannot use wildcards. In the example below, the second URL could be a production URL.

      				
      http://localhost:8080 https://myproductionurl.example.com
    2. The Authorized redirect URI field does not require a value. Redirect URIs are not used with JavaScript APIs.
    3. Press the Create button.
  6. From the resulting OAuth client dialog box, copy the Client ID . The Client ID lets your app access enabled Google APIs.

Now you can add Google Sign-In to your website. ADD GOOGLE SIGN-IN

版權聲明:本文采用知識共享 署名4.0國際許可協議 [BY-NC-SA] 進行授權
轉載事宜:如需轉載需徵得應允,轉載必須注明來源於本站的信息。
文章名称:《Creating a Google API Console project and client ID》
文章链接:https://www.thefreesky.com/blog/23440.html
本站資源僅供個人學習交流,請於下載後24小時內刪除,不允許用於商業用途,否則法律問題自行承擔。

評論 抢沙发