Deprecated plus.me and plus.login used in Google_Service_Oauth2
Problem
With the upcoming Google+ deprecation we are told that the plus.me and plus.login scopes will be deprecated and should be replaced with openid and profile respectively.
However, in https://github.com/googleapis/google-api-php-client-services/blob/d7a06d07832dbc6759d8f27ef29ccd6caed62735/src/Google/Service/Oauth2.php#L35 the old scopes are being referenced.
Will these deprecated scopes cause a problem for when they get shut down when calling createAuthUrl?
Code example
$client = Google::getClient(config('google'));
// ... additional $client config removed
$client->addScope([
'profile',
'openid',
'https://www.googleapis.com/auth/plus.business.manage',
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile']);
$loginUrl = $client->createAuthUrl();
@scottybo - Thanks for the info here. I'll do some investigation and find out what we need to change here to keep things working.
Incredible that it's not working, this library is not even using openId. We can not use it anymore... We'll try another library to authenticate...
Several features were shut down by Google yesterday, so daily operation is affected already. We need a fix immediately or another lib...
Just wondering if this will be updated in time for the March 7 deprecation.
I might be wrong here but isn't it so that the Google Api PHP Client is just a way to connect to Google API and whatever API scope is defined to be called by the code is actually used? So if no Google+ scope is defined, that API is actually not being used.
For example in the example on Readme - the scope here has nothing to do with Google+
$client->addScope(Google_Service_Drive::DRIVE);
Take a look at MediaWiki Extension:GoogleLogin - that one is using Google API PHP Client but no Google+ API scope is actually called.
My point is - take a look at your code - a fix to the Google API PHP Client will probably not fix the issue.
However, in https://github.com/googleapis/google-api-php-client-services/blob/d7a06d07832dbc6759d8f27ef29ccd6caed62735/src/Google/Service/Oauth2.php#L35 the old scopes are being referenced.
These scopes are auto-generated off of the latest discovery document found here. I expect once the shut-down is complete on March 7 that these scopes will be updated, and new constants should be available.
Will these deprecated scopes cause a problem for when they get shut down when calling createAuthUrl?
Yes, I believe they would. You'll want to hard-code in the usage of profile, openid, and email as scopes until new constants are available in the generated code. This is certainly confusing, and I apologize for the hassle.
@chandon, @PederBennedsen, @robthomas82 - I don't fully understand the issue you're running up against. Are you running into issues due to usage of the deprecated constants defined here? If so, please make sure you update your code to use the latest scopes which will be taking precedence after the upcoming the Google+ shutdown. I'm going to go ahead and close this out for now, but please feel free to re-open if there is anything else can help touch on.