Search code examples
c#asp.netgoogle-apigoogle-oauthgoogle-domain-api

Log in user Google oAuth without consent screen


I am developing a project for Google Apps for Education. It is using domain wide delegation, to access user account's data across a domain.

This is done with the Google Service Accounts (https://developers.google.com/identity/protocols/OAuth2ServiceAccount)

But in order to log the user in, and get his email, i use a normal oAuth login procedure. (https://developers.google.com/identity/protocols/OAuth2WebServer)

This does however result in a consent screen for the user, asking for his email and "Know who you are on Google".

Is there a way to log in the user, and get a object from Google, containing email etc., without showing this consent screen?

Thanks in advance


Solution

  • You should pass the domain in hd= parameter. Soon we are changing the "approval page" to a simple account selection page when only email scope is requested. So this experience will become what you would ideally want, just that user would need to confirm the account with one click (not an approval).