songnguxyz / oauth-mediawiki
Log in to your Flarum forum with MediaWiki OAuth2
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:flarum-extension
pkg:composer/songnguxyz/oauth-mediawiki
Requires
- flarum/core: ^1.2.0
- fof/oauth: ^1.3.0
- league/oauth2-client: ^2.6
README
Log in to your Flarum forum with MediaWiki OAuth2. An addon for FoF OAuth
This extension allows users to authenticate with any MediaWiki installation that has OAuth2 enabled (MediaWiki 1.35+).
Installation
Install with composer:
composer require songnguxyz/oauth-mediawiki
Updating
composer update songnguxyz/oauth-mediawiki
Setup
-
Enable the OAuth extension on your MediaWiki installation. See MediaWiki OAuth documentation for details.
-
Register an OAuth2 consumer on your MediaWiki:
- Go to
Special:OAuthConsumerRegistration/proposeon your wiki - Select "OAuth 2.0" as the OAuth protocol version
- Fill in the required details including the callback URL from your Flarum OAuth settings
- Request the necessary grants (at minimum:
mwoauth-authonlyfor authentication) - Note down the
client_idandclient_secretprovided
- Go to
-
In your Flarum admin panel, enable this extension and configure:
- MediaWiki Base URL: Your MediaWiki REST API base URL (e.g.,
https://yourwiki.example.com/w/rest.php). This is the URL where the OAuth2 endpoints are available. - Client ID: The client ID from step 2
- Client Secret: The client secret from step 2
- MediaWiki Base URL: Your MediaWiki REST API base URL (e.g.,
-
Log in with MediaWiki!