Extension:GoogleLogin/PreAuthManager

The GoogleLogin Extensions allows wiki users to login with their Google Accounts. The extension uses Google API to request user data. If the user logged in first time, the extension allows to create a user with the Google-Mail-adress and Google username (or given name, or an own name).

This Extension is available in german and english.

Requirements
To use this extension you need:
 * MediaWiki 1.20+
 * MySQL (no PostgreSQL or SQLite support for now!)
 * PHP 5.3+
 * Google Developer Access
 * Google+ API access
 * API Credentials for Webapplication (Client ID and Client Secret)

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

What this extension do
With the database update, the extension will create a new tabel called prefix_user_google_user which contains the needed connection between the wiki users and google accounts. It stores only the Google UserId and the Wiki UserId.

If a user calls the special page GoogleLogin, he will instantly redirected to Google Authentication request to give your application access to some user information stored by google. The user must accept this request (or he can not use the login with Google). After accept, the user become the possibility, if he isn't logged in as a wiki user, to create a new account. The username he can choose self or chosse one of the suggestions, based on the Google user name and given name (if one s free and createable). If the choosed username is createable (free, valid and not blocked), a new user with the username and the Google-Mail as E-Mailadress will be created and linked to the Google Account.

If the user is logged in (means: he has already a wikiaccount) he can link this account with the google account, this the user must do only once. If the connection is created, the user will be able to login simply by clicking Login with Google button on Special:Login.

If the wikiaccount and Google account is connected, the user can, if he navigates to Special:GoogleLogin, unlink his account and google account.

Google API PHP Client
This Extension uses the Google API PHP Client, distributed under the Apache 2.0 License. The Client can be downloaded from GitHub.