The function getPreferredUsername() returns a string which is then used as a username. But the line 349 in OpenIDConnect.php
https://github.com/wikimedia/mediawiki-extensions-OpenIDConnect/blob/master/src/OpenIDConnect.php#L349
returns the string without making it a valid username:
$nt = Title::makeTitleSafe( NS_USER, $preferred_username ); if ( $nt === null ) { return null; } return $preferred_username;
Login attempts fail if the string does not start with a capital letter. The line should be:
return $nt->getText();