Use this file to discover all available pages before exploring further.
MediaWiki’s authentication system is built around AuthManager, a pluggable framework introduced in MediaWiki 1.27. Authentication is handled by a pipeline of providers that can be combined to support anything from username/password login to OAuth and LDAP.
Runs before primary authentication. Used for throttling, CAPTCHA, block checks. Example: ThrottlePreAuthenticationProvider, CheckBlocksSecondaryAuthenticationProvider.
PrimaryAuthenticationProvider
Actually authenticates the user — verifies the credential and maps it to a MediaWiki account. Examples: LocalPasswordPrimaryAuthenticationProvider, TemporaryPasswordPrimaryAuthenticationProvider.
SecondaryAuthenticationProvider
Runs after primary authentication succeeds. Used for 2FA, email verification, password change enforcement. Example: ResetPasswordSecondaryAuthenticationProvider.
Bot passwords allow automated scripts and tools to authenticate without using the main account password. They support a granular grant system that limits what rights the bot session has.Users create bot passwords at Special:BotPasswords. Each bot password has:
A name (alphanumeric suffix)
A set of grants (read, edit, create accounts, etc.)
The actual password (shown once on creation)
Bot passwords authenticate as Username@BotPasswordName:
# Using curl to authenticate via the APIcurl -c cookies.txt \ -d "action=login&lgname=MyBot@mybotpassword&lgpassword=xxxxx&format=json" \ https://wiki.example.com/api.php
// LocalSettings.php// Enable bot passwords (enabled by default)$wgEnableBotPasswords = true;// Maximum number of bot passwords per user (since 1.46)$wgBotPasswordsLimit = 100;
MediaWiki does not ship a 2FA provider in core, but the OATHAuth extension provides TOTP-based 2FA as a SecondaryAuthenticationProvider.After installing OATHAuth:
The OAuth extension allows third-party applications to authenticate users and obtain scoped API access without sharing passwords.
// LocalSettings.phpwfLoadExtension( 'OAuth' );// Grant management interface at Special:OAuthConsumerRegistration// (for extension developers registering OAuth consumers)
MediaWiki acts as an OAuth 1.0a (and optionally OAuth 2.0) server. Consumers register at Special:OAuthConsumerRegistration and request specific grants. Users authorize access at Special:OAuthAuthorize.
Temporary accounts (introduced in MediaWiki 1.39) provide IP privacy for anonymous edits. Instead of logging the IP address as the editor, MediaWiki creates a temporary account with a system-generated name.