From mediawiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Release status: unmaintained
Description Github OAuth2 extension
Author(s) KasperRT (Stefan2904talk)
License MIT License

Check usage and version matrix.

The OAuth2Github MediaWiki extension enables login to your MediaWiki with Github as OAuth2 identity provider.


  • Download and place the file(s) in a directory called OAuth2Github in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/OAuth2Github/OAuth2Github.php";
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters[edit]

$wgOAuth2Github['client']['id']             = '';
$wgOAuth2Github['client']['secret']         = '';

$wgOAuth2Github['config']['required_org']   = 'LosFuzzys';
$wgOAuth2Github['config']['auth_endpoint']  = 'https://github.com/login/oauth/authorize'; 
$wgOAuth2Github['config']['token_endpoint'] = 'https://github.com/login/oauth/access_token';
$wgOAuth2Github['config']['info_endpoint']  = 'https://api.github.com/user';
$wgOAuth2Github['config']['auth_type']      = 'token';

The callback url back to your wiki would be: http://your.wiki.domain/path/to/wiki/Special:OAuth2Github/callback