Getting a random error: policy_enforced on most Google Apps when using OAuth 2

杀马特。学长 韩版系。学妹 提交于 2019-11-27 15:22:53

问题


Since yesterday (October 2nd, 2014), there seem to be random errors when trying to access apps that use OAuth 2.

There are two problems:

  1. We can't access the apps we use for our internal management.

  2. Our clients that cannot login through their Google Apps sign in.

Here are the details of the error:

Request Details

from_login=1
response_type=code
scope=email profile https://www.googleapis.com/auth/drive.file
access_type=online
redirect_uri=https://login.xero.com/SignIn/GoogleOAuthCallback
as=-5fc43****cf15779
pli=1
client_id=1061085901692-8vaq9******vuv2d2cro0eervp04j7a.apps.googleusercontent.com
authuser=0
hl=en

回答1:


I caused the same problem at OpenID Connect authentication, so I had been made a query to Google Cloud Platform support.

Google updated to be not able to short name scope on Marketplace (without an announcement). Now Google are considering to re-use short name scopes. So We have to use long URL scope until Google corresponding to complete.

  • email replace to https://www.googleapis.com/auth/userinfo.email or https://www.googleapis.com/auth/plus.profile.emails.read
  • profile replace to https://www.googleapis.com/auth/userinfo.profile or https://www.googleapis.com/auth/plus.login
  • openid replace to https://www.googleapis.com/auth/plus.me



回答2:


We are getting the same issue on our application. I have tested with using long names for scopes, but it did not help.

Also, it appears that the error only occurs from a Google Apps account. Regular Google account works fine.

The error does not occur for the users who have already given permission to the application.



来源:https://stackoverflow.com/questions/26175380/getting-a-random-error-policy-enforced-on-most-google-apps-when-using-oauth-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!