一、创建授权凭据
- Go to the Credentials page.
- 依次点击创建凭据 > OAuth 客户端 ID。
- 选择 Web 应用应用类型。
- 为您的 OAuth 2.0 客户端命名,然后点击创建
二、加载 Google 平台库
您必须在集成 Google 登录功能的网页上添加 Google 平台库。
<script src="https://apis.google.com/js/platform.js" async defer></script>
三、创建Client ID和Client secret




安装 Google API 客户端库
composer require google/apiclient:^2.10