I use the OIDC Connect extension, and I would like to change my OIDC provider. In my LocalSettings.php I have set $wgOpenIDConnect_MigrateUsersByEmail
to true. After changing the relevant settings (clientID, cientsecret, providerURL and preferred_username), I can login, but a new user is created with the username User (User1, User2, etc. in case of other users) and MediaWiki does not recognize that the users are the same (even the preferred_username values and emails retrieved from the id_token are the same). I also tried to delete the contents of the openid_connect table (docu says for $wgOpenIDConnect_MigrateUsersByEmail
that "ff a user already exists in the database with the same email address as the authenticated user and has null values for subject and issuer, use this user, setting the subject and issuer in the database to those of the authenticated user. This is useful when the wiki previously used a different authentication mechanism.").
Here is my configuration:
$wgPluggableAuth_Config['Blabla'] = [
'plugin' => 'OpenIDConnect',
'data' => [
'providerURL' => 'https://my-new-provider/',
'clientID' => 'my-new-client-id',
'clientsecret' => 'my-new-client-secret',
'preferred_username' => 'something-company-specific',
'scope' => [ 'openid', 'profile', 'email' , 'something-company-specific' ],
]
];
$wgOpenIDConnect_UseRealNameAsUserName = false;
$wgOpenIDConnect_UseEmailNameAsUserName = true;
$wgOpenIDConnect_MigrateUsersByUserName = false;
$wgOpenIDConnect_MigrateUsersByEmail = true;
$wgOpenIDConnect_ForceLogout = false;
$wgOpenIDConnect_RedirectURI = 'https://my.wiki.installation/index.php/Special:PluggableAuthLogin';
I also checked, that "email" and "something-company-specific" claims can be found in the id_token.
Wiki Version: 1.39.4
OpenID Connect Version: 7.0.1
PluggableAuth Version: 7.0.0
What I am doing wrong?