We are upgrading our OAuth1 Google Apps marketplace app to OAuth2 On upgrade old app is uninstalled, new app is installed but data access is not granted automatically
Old app scopes:
https://apps-apis.google.com/a/feeds/user/#readonly # provisioning API
New app scopes:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/admin.directory.user.readonly # directory_v1 API
https://www.googleapis.com/auth/appsmarketplace.license
I don't understand were is the problem. AFAIK In old OAuth1 apps userinfo and LicensingAPI access was enabled automatically. ProvisioningAPI and Directory_v1 scopes match. What we should change to grant data access automatically on upgrade.
The scope https://www.googleapis.com/auth/appsmarketplace.license
counts as a new scope, and prevents the authorization from being transferred during the upgrade. Instead of asking the admin of the domain to grant access to this scope, grant access to this API once as the developer of the application and use that token to access this API for all customers.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.