Open main menu

Extension:OAuth2Github

MediaWiki extensions manual
OOjs UI icon advanced.svg
OAuth2Github
Release status: unmaintained
Description Github OAuth2 extension
Author(s) KasperRT (Stefan2904talk)
License MIT License
Download
Translate the OAuth2Github extension if it is available at translatewiki.net
Check usage and version matrix.

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

InstallationEdit

  • 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";
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parametersEdit

$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