google-auth-library-python-oauthlib icon indicating copy to clipboard operation
google-auth-library-python-oauthlib copied to clipboard

Library raises a warning for business.manage scope

Open ThibaultClerc opened this issue 9 months ago • 1 comments

The library raises a warning regarding business.manage scope since Google official OAuth 2.0 documentation considers it "refers to a legacy API".

FYI, this is what you get when clicking on the business.manage URL https://www.googleapis.com/auth/business.manage

Image

The only scopes that are officialy mentioned in the Oauth 2.0 API documentation are :

  • openid
  • userinfo.email
  • userinfo.profile

Whenever I'm using google_auth_oauthlib.flow and injecting business.manage inside scopes (in order to get businesses informations from a Google OAuth Account), I'm getting this warning after calling flow.fetch_token:

Scope has changed from

"https://www.googleapis.com/auth/userinfo.email
openid
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/business.manage"

to

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

The problem is : Google has no official deprecation plan regarding this, and if I remove business.manage from my scopes, I don't get the businesses informations I need anymore.

What should I do for :

  • being able to continue to fetch the businesses informations from an account ?
  • doing so without getting this warning ?

Thank you

ThibaultClerc avatar Mar 10 '25 14:03 ThibaultClerc

This is due to this block of code inside the official oauthlib code, but their solution is not very flexible as it shuts down all warnings related to scope change.

ThibaultClerc avatar Mar 18 '25 08:03 ThibaultClerc