Topic on Extension talk:GoogleLogin

Proper use of authoritative mode

4
2A02:8388:6682:5280:E9A2:263F:A6D7:3629 (talkcontribs)

Context: For our private wiki we want to exclusively login via GoogleLogin. For now some administrative accounts have been in use.

Problem: Having set the following to make sure GoogleLogin is the only authentication provider, according to the older comment below:

$wgAuthManagerConfig = [
'primaryauth' => [
  GooglePrimaryAuthenticationProvider::class => [
    "class" => GooglePrimaryAuthenticationProvider::class,
    "sort" => 0
]
],
'preauth' => [],
'secondaryauth' => [],
];


And all other requirements put in place as well, there is still an error:

Uncaught GoogleLogin\\ConfigurationError: GoogleLogin runs in authoritative mode, but multiple primary authentication providers where found.

How can this be approached? Is there a way to call the getPrimaryAuthenticationProviders() function from AuthManager.php? I was not able to successfully do that due to "LoggerAwareInterface not found".


Any help is very appreciated!

80.110.121.222 (talkcontribs)

Without running authoritative mode this error appears:

[cd762b94d14e4d14a0583255] /index.php/Spezial:Anmelden Error from line 77 of /var/lib/mediawiki/vendor/wikimedia/object-factory/src/ObjectFactory.php: Class 'GooglePrimaryAuthenticationProvider' not found

80.110.121.222 (talkcontribs)

The last comment is not related, I had uncommented a wrong line.

Florianschmidtwelzow (talkcontribs)

Hi! First of all: If you're using GooglePrimaryAuthenticationProvider::class, you need to have a proper import for the class GooglePrimaryAuthenticationProvider.

That said, you can pull the latest version of the extension (master) in order to get a more detailed error message.

Best, Florian

Reply to "Proper use of authoritative mode"