Reputation: 414
I'm developing a web application that communicates with Google services (e. g. Gmail and Google Drive). So I have OAuth 2.0 application created in my Google Workspace organization. It requires particular OAuth scopes for correct work.
A lot of people currently use my application. Therefore, I added new features to it recently. However, the end user should grant access to additional scopes to use those features. One possible way to handle this is to ask the user to go to the Google Workspace Admin console (https://admin.google.com/) and find my application in the list of Google Workspace Marketplace Apps. Then he should manually grant the required Google service APIs (OAuth scopes). But this is not transparent enough. As a result, the user experience is not optimal. Moreover, my application cannot deduce whether the user granted permissions.
The best approach is redirecting the user to the Google consent screen when he opens my web application. As a result, he will be aware of the new functionality and can automatically enable it by granting required OAuth scopes.
How can I obtain the consent screen for my application and the target user organization?
Upvotes: 1
Views: 647
Reputation: 318
Step 9 of Google's process overview explains what you're asking about.
It plainly states: "If additional access is needed, your app asks the user to grant new scopes of access, resulting in a new request to get an access token (steps 3–6)."
See also this post on StackOverflow for the URL to show the consent screen.
Upvotes: 0