MediaWiki
Configure MediaWiki wallet login through Keycloak with the standard OpenID Connect extensions.
Connect MediaWiki to Keycloak; Keycloak connects to the Ver.iD platform. Yivi is the example wallet.
What you need
First prepare your organization in Ver.iD Studio.
MediaWiki 1.43.11, PHP with cURL, PluggableAuth 7.5.0 and OpenID Connect 8.3.0. Install the official extension packages and their bundled runtime dependencies. Keep a local administrator login available.
Configure Ver.iD
Add Keycloak's callback URL in Ver.iD Studio → Verify → Authentications → your flow → Redirect URIs: <keycloak-base-url>/realms/<realm>/broker/verid/endpoint. See Add redirect URIs. Your application callback is configured separately on its Keycloak client.
Configure Keycloak
Apply the verified-contact post-login flow to the Ver.iD provider so both requested contacts and their verification flags are required before account access.
- Complete the Keycloak setup, including the protected wallet attributes and
verid-wallet-claimsclient scope. Enable Add to userinfo for its four wallet-claim mappers. Keep upstream Ver.iD UserInfo disabled. - In Keycloak, create a confidential OpenID Connect client. Enable Standard flow; disable Implicit flow, Direct access grants and Service accounts roles. Set Valid redirect URIs to your wiki's exact canonical
Special:PluggableAuthLoginURL. Assign onlybasicandverid-wallet-claimsas default scopes and disable Full scope allowed.
Configure MediaWiki
- Load the extensions and add this configuration to
LocalSettings.php. Supply the issuer and client credentials through the PHP service's private environment:
wfLoadExtension( 'PluggableAuth' );
wfLoadExtension( 'OpenIDConnect' );
$wgPluggableAuth_EnableLocalLogin = true;
$wgOpenIDConnect_MigrateUsersByEmail = false;
$wgOpenIDConnect_MigrateUsersByUserName = false;
$wgOpenIDConnect_UseRandomUsernames = true;
$wgPluggableAuth_Config['Log in with Digital Identity Wallet'] = [
'plugin' => 'OpenIDConnect',
'data' => [
'providerURL' => getenv( 'WIKI_BROKER_ISSUER' ),
'clientID' => getenv( 'WIKI_BROKER_CLIENT_ID' ),
'clientsecret' => getenv( 'WIKI_BROKER_CLIENT_SECRET' ),
'scope' => [ 'openid' ],
'preferred_username' => '',
'EmailProcessor' => static fn ( $email, array $claims ): string =>
$claims['wallet_email'] ?? '',
],
];WIKI_BROKER_ISSUER is <keycloak-base-url>/realms/<realm>. The credentials belong to the wiki client in Keycloak; Studio credentials remain on Keycloak. Keep HTTPS certificate validation enabled. Do not enable automatic account migration by email or username.
- Run the standard MediaWiki database updater from the wiki root:
php maintenance/run.php update --quickTest the login
Open Special:UserLogin in a private window, choose Log in with Digital Identity Wallet, select Yivi and approve the request. Confirm MediaWiki opens a normal account. Sign out and repeat: the same account must return. Cancel a fresh request: no new wiki session should appear.
The wiki retains its own permissions and editable profile fields. A separate contact panel is not required for authentication.
If login fails, check the exact wiki callback, Keycloak client credentials and PHP's TLS trust. Follow the Keycloak troubleshooting guide for upstream wallet errors.