Release status: experimental |
|
|---|---|
| Implementation | User identity |
| Description | Create accounts or login using OAuth |
| Author(s) | Moritz Hedtke (Dev.mohetalk) |
| Latest version | 0.2.0 (2022-05-07) |
| Compatibility policy | Master maintains backward compatibility. |
| MediaWiki | 1.35.0+ |
| PHP | 7.4+ |
| Database changes | Yes |
| Tables | authmanageroauth_linked_accounts |
| License | GNU General Public License 2.0 or later |
| Download | GitHub: Note: Changelog |
|
Parameters
$wgAuthManagerOAuthConfig |
|
|
Hooks used
|
|
The AuthManagerOAuth extension allows to create accounts or login using OAuth.
Installation
- Download and place the file(s) in a directory called
AuthManagerOAuthin yourextensions/folder. - Only when installing from Git, run Composer to install PHP dependencies, by issuing
composer install --no-devin the extension directory. (See task T173141 for potential complications.) - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'AuthManagerOAuth' );
- Run the update script which will automatically create the necessary database tables that this extension needs.
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration parameters
$wgAuthManagerOAuthConfig = [
'github' => [
'clientId' => 'xxx',
'clientSecret' => 'xxx',
'urlAuthorize' => 'https://github.com/login/oauth/authorize',
'urlAccessToken' => 'https://github.com/login/oauth/access_token',
'urlResourceOwnerDetails' => 'https://api.github.com/user'
],
'google' => [
// ...
]
];
The values in this keyed array have to conform to the parameter of the GenericProvider constructor at https://oauth2-client.thephpleague.com/usage/. The key cannot be changed afterwards as it's used in the database for storing the linked accounts.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.