2014-10-03 80 views
2

在9:30左右PST昨日(10/2),一些用户报告了以下文字错误:谷歌的OAuth2错误 - 关于安全策略安装失败消息

Error: policy_enforced 

Application: ***** 

You can email the developer of this application at:***** 

Access denied by a security policy established by the Google Apps administrator of your organization. Please contact your administrator for further assistance 

Details: 
response_type=code 
scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile http://www.google.com/m8/feeds/ https://mail.google.com/ https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/admin.directory.userhttps://www.googleapis.com/auth/appsmarketplace.license 
redirect_uri=***** 
login_hint=***** 
state=pw_signin|||***** 
hd=***** 
client_id=***** 
That’s all we know. 

我们的应用程序并没有因为周二改变(9/30)。我们仍在使用以下不推荐的示波器:

https://www.googleapis.com/auth/userinfo.email 
https://www.googleapis.com/auth/userinfo.profile 

我们不相信将它们更改为新的示波器将有所帮助。有没有人发现是什么造成这个问题?

回答

1

如果这种情况刚刚发生在昨晚,这是由于Google推送的更新发生的,因此他们正在回滚。以下内容已发布到G +上:

对此问题表示歉意,这是由于我们今天做出了更改而造成的。 我们将在明天回滚,以便解决此问题。 在此期间,你也可以用代码变化 以及解决该问题:

的根本原因是你在登录时要求什么授权范围和 之间的不匹配。在GAM设置, 弃用范围正在使用(硬编码,这是我们的错):

https://www.googleapis.com/auth/userinfo.profile

https://www.googleapis.com/auth/userinfo.email

在请求中,你可能会使用较新的领域:

电子邮件

轮廓

语义,这些是相同的范围。但是,范围没有正常化,并且只是直接比较了 。在今天之前,如果出现不匹配, 将回退到提示用户授予 附加作用域的行为。今天早些时候推出了一项政策调整 。

最快的修复方法是在您的登录请求中恢复到userinfo.profile和/或userinfo.email作用域 。 这不应该要求管理员采取任何操作,并且应该还原 登录功能。

或者,您可以将电子邮件&配置文件 范围添加到您的SDK设置并让管理员重新授权。长期 可让您从已弃用的范围中获益,并且 允许您在开发者控制台中允许删除它们。

+1

你从哪里找到G +信息?这是一个我们必须加入的私人团体吗? – AllGood 2014-10-04 16:42:25

+0

我相信它已在Google G +社区的开发企业级应用程序中使用(https://plus.google.com/u/0/communities/116649587096405255956?cfem=1)。 – miketreacy 2014-10-04 18:17:21