Extension:GoogleLogin

The GoogleLogin extension allows wiki users to login with their Google account. The extension uses the Google API to request basic profile information from Google (such as the account ID, the full name and the e-mail address).

Requirements
To use this extension you need at least:
 * MediaWiki 1.28+
 * MySQL (no PostgreSQL or SQLite support for now!)
 * PHP 5.5+
 * Google Developer Access
 * Google+ API access
 * API Credentials for Webapplication (Client ID and Client Secret)
 * Able to run

Configuration
Ensure that all settings reside under the "require_once" directive added for this plugin. Otherwise any custom settings will be overwritten by the default settings, as referenced here: Topic:Si6ituq6hmxb07xm

The extension provides two configuration variables to set the Client ID and Client Secret (you get this pair in the Google Developer Console, remove "<" and ">").

Settings in Google Developer Console
To use this extension you need a Google developer account and access to the developer console. This is a simple (a very simple!) step-by-step guide (use Step 1 of the official step-by-step example with these settings):
 * 1) Open Google developer console
 * 2) Read and accept the terms of service
 * 3) Create your first project
 * 4) Go to APIS & AUTH
 * 5) Go to APIs and enable Google+ API (read and accept the terms)
 * 6) Go to Credentials
 * 7) In Section OAuth click Create new Client ID
 * 8) Select as Web application as APPLICATION TYPE, as Authorized JavaScript origins type in your domain name (no wildcards and directories allowed!)
 * 9) Type in your Authorized redirect URI like this example:
 * If your domain is example.com and you have installed MediaWiki in Root of your domain, the redirect URI is as follows: http://example.com/index.php/Special:GoogleLoginReturn
 * 1) Click create and copy the Client ID and Client Secret to the configuration variables in LocalSettings.php

"Special:GoogleLoginReturn" or (in german for example) "Spezial:GoogleLoginReturn"
The allowed redirect URI in Google developer console must be in the content language. So, if your wiki has german as the content language, then use. If you used the wrong language, all authentication requests will fail with the error code redirect uri mismatch.

Debug
Normally, you can see the error message on all generic error pages. Sometimes there are Internal Errors, called Exceptions. In this case, please add $wgShowExceptionDetails with value true in LocalSettings.php to see the complete Exception message. For a support request, please provide always the lines of the Exception.

Use on a private wiki
If you have set your Wiki to private with

you have to whitelist the "Special:GoogleLogin" page, so that anonymous users can access the callback URL after being redirected from the authentication provider. You can do this by adding the following line to your LocalSettings.php:

Google API PHP Client
This Extension uses the Google API PHP Client (included in versions before 0.2.1), distributed under the Apache 2.0 License. The Client can be downloaded from GitHub.