Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 816
Mic Avatar asked Oct 03 '14 08:10

Mic


People also ask

What is redirect URI in oauth2 Google?

The redirect URIs are the endpoints to which the OAuth 2.0 server can send responses. These endpoints must adhere to Google's validation rules. For testing, you can specify URIs that refer to the local machine, such as http://localhost:8080 .

Does Google use OAuth?

Google APIs use the OAuth 2.0 protocol for authentication and authorization. Google supports common OAuth 2.0 scenarios such as those for web server, client-side, installed, and limited-input device applications. To begin, obtain OAuth 2.0 client credentials from the Google API Console.

Is Google OAuth 2.0 free?

It is not free.


1 Answers

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
like image 105
Y.U GG Avatar answered Sep 22 '22 18:09

Y.U GG