Drupal 6

Google supports the OAuth standard for API authentication. By using this module, web applications can access a user's Google Apps account without needing the user's GApps login details. The user logs into the site with their Drupal username and password. Once authenticated, they are then immediately redirected to the Google login page where they must confirm (or reject) that the website is allowed to use an authorization token to access their Google account.

Administrators of Google Apps Premier and Education editions can also use a special type of OAuth, called 2-legged OAuth. Unlike standard OAuth, the user is not actually authenticated with Google, but the site is able to act on their behalf to pull in or update their account data. Currently this authentication is implemented, but no APIs make use of it yet.

For more details, see http://code.google.com/apis/accounts/docs/OAuth.html

To enable OAuth on your domain go to https://www.google.com/accounts/ManageDomains

Recommended reading: Overview of Google authentication methods - This blog post explains the different Google authentication options available and also the Drupal modules which implement them.

Note: Google offers two libraries for handling authentication: one using the OAuth open standard, and a second interface called AuthSub, developed prior to the release of the OAuth standard. The Google Authentication for Web Applications implements AuthSub. This module implements the OAuth interface.

Requirements
This module depends on the OAuth module.

Drupal 7

Drupal 7 branch allows you to authenticate with google and use this authentication to carry other api requests. This module can help you to manage accounts, authenticate with google (i.e. get access token) and use this authentication to carry api requests in other modules. This module allows you to enter google account details like client id, client secret key, developer key, select google services to be enabled and gets the OAuth2 access token from google. The account manage page also shows a authenticate link if the account is not authenticated (this can be helpful to authenticate later if the account is created by gauth_account_save) and shows a Revoke link if the account is already authenticated and you want to revoke access.

This module is based on google api php client refer https://github.com/google/google-api-php-client

You can refer more at https://developers.google.com/accounts/docs/OAuth2Login#scopeparameter and https://developers.google.com/accounts/docs/OAuth2 for Google OAuth2.
You can manage multiple google account on drupal site and use any of these accounts to carry a request to the google apis in other modules.
Requirements

Google Account Api Access Configuration
You need to create a client id account at https://code.google.com/apis/console, in api access.
Add your site domain like http://mysite.com and set the redirect url as http://mysite.com/gauth/response_handler

The 7.x-1.7 release is tested with google api php client 2.0.2. This release works only with 2.0 version of the library and don't support prior versions
The 7.x-1.5 release is tested with google api php client 1.1.6.
The 7.x-1.9 is tested with v2.1.0 of google api php client with both package and composer install
You need to patch the library to use offline mode https://github.com/google/google-api-php-client/pull/1103/files more details https://www.drupal.org/node/2797735

7.x-2.0 is a major improvement, it uses completely new method of detecting scopes and supported apis. This will list all apis which are supported by the installed library.

Drupal 8

1) GAuth is now merged with Google Api Php Client. Development is in progress, soon we will have a stable release. Gauth users can use 8.x-3.x branch, I also have created migration for basic gauth accounts.
2) Gauth_user which was a sub module is now a separate module as Google Authentication for User The basic version is ready but it's still improving, once we have stable version we will provide migrations.
3) Gauth_login is now a separate module as Google OAuth Login

Project information

Releases