📜  谷歌登录所需的范围是什么 (1)

📅  最后修改于: 2023-12-03 15:28:12.561000             🧑  作者: Mango

谷歌登录所需的范围

当开发人员使用谷歌身份验证作为其应用程序的身份验证方法时,他们需要指定谷歌登录所需的范围。下面介绍常见的谷歌登录所需的范围。

1. openid

OpenID Connect(OIDC)是一种基于OAuth 2.0协议的身份验证协议,可以使用户在不必暴露其密码的情况下使用其谷歌帐户登录到应用程序。 openid 范围是在谷歌登录时必需的。

2. profile

profile 范围允许应用程序访问用户的个人资料信息,如姓名、个人资料图片等。

3. email

email 范围允许应用程序访问用户的谷歌帐户电子邮件地址。

4. https://www.googleapis.com/auth/calendar

https://www.googleapis.com/auth/calendar 范围允许应用程序访问用户的谷歌日历数据。

5. https://www.googleapis.com/auth/drive

https://www.googleapis.com/auth/drive 范围允许应用程序访问用户的谷歌驱动器数据。

6. https://www.googleapis.com/auth/gmail.compose

https://www.googleapis.com/auth/gmail.compose 范围允许应用程序发送以用户身份记录的电子邮件。

7. https://www.googleapis.com/auth/youtube.upload

https://www.googleapis.com/auth/youtube.upload 范围允许应用程序将视频上传到用户的YouTube帐户。

8. https://www.googleapis.com/auth/calendar.events

https://www.googleapis.com/auth/calendar.events 范围允许应用程序在谷歌日历中创建、查看、修改和删除事件。

9. https://www.googleapis.com/auth/contacts

https://www.googleapis.com/auth/contacts 范围允许应用程序访问用户的谷歌联系人数据。

以上是常用的谷歌登录所需的范围,开发人员可以根据自己应用程序的需要添加其他范围。同时,安全很重要,避免使用过多的范围,只使用必要的权限。