使用OAuth 2.0客户端ID限制Google Project中的帐户(Limit accounts in Google Project using OAuth 2.0 client IDs)

编程入门 行业动态 更新时间:2024-10-28 07:33:47
使用OAuth 2.0客户端ID限制Google Project中的帐户(Limit accounts in Google Project using OAuth 2.0 client IDs)

我正在尝试使用Google API开发我的第一个使用Google云端硬盘的集成服务(我是新手)。 我将OAuth 2.0客户端ID配置为凭据,但我的服务必须限制只能访问指定的一组帐户(Gmail)。 是否可以通过在Developer Console中设置任何参数来执行此操作?

我显然可以创建一个登录页面,但最好的解决方案是使用与Google API集成的东西(首选PHP)。

谢谢大家

I am trying to use Google API to develope my first integration service with Google Drive (I am a newbie). I configuared OAuth 2.0 client IDs as credentials but my service have to limit access only to a specified set of accounts (Gmail). Is it possible to do this, by setting any parameters in Developer Console?

I can obviously create a login page, but the best solution would be to use something integrated with Google API (preference for PHP).

Thanks all

最满意答案

在Google中创建开发人员帐户并为Oauth 2.0创建应用程序后,您无法对可由Google中的应用进行身份验证的电子邮件ID(gmail)设置任何限制。

您必须在代码中检查。 据我所知,谷歌并没有提供这个选项。

Once you create a developer account in Google and create an application for Oauth 2.0 , You cant set any limit on email ids(gmail) that can be authenticated by your app in Google.

You will have to do that check in your code. Google doesnt provide that option as far as I know.

更多推荐

本文发布于:2023-07-18 11:36:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1159791.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:帐户   客户端   Google   ID   OAuth

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!