Topic on Extension talk:GoogleLogin

How to manually create account

3
Summary by Florianschmidtwelzow

Not a bug, just an explanation of how to manually create a connection between an arbritary wiki account as an admin.

Electron.rotoscope (talkcontribs)

I'm using GoogleLogin: REL1_33 | 2019-06-17T19:10:00 | 31ece02 with MediaWiki 1.33 which I understand doesn't support AuthoritativeMode, but just in case it's relevant and I just have a configuration error I've put what I think are the relevant portions of LocalSettings.php below

If I have to create users manually I'm happy to do it, but I don't understand how I can do that. Is it as simple as logging in with the default admin user (not authenticated through google) and then creating users with the right email address as their username? I see that it asks for a Google ID, is that still relevant? Will it still be relevant with the new API etc?

Thanks!!!


<?php

use GoogleLogin\Auth\GooglePrimaryAuthenticationProvider;

$wgGroupPermissions['*']['createaccount'] = true;

$wgGroupPermissions['*']['edit'] = false;

$wgGroupPermissions['*']['read'] = false;

wfLoadExtension( 'GoogleLogin' );

$wgWhitelistRead = array( 'Special:GoogleLoginReturn' );

$wgGLSecret = 'fromgoogledevel';

$wgGLAppId = 'fromgoogledevel';

$wgGLAllowedDomains = array( 'ourgsuitedomain.com' );

$wgGLAllowedDomainsStrict = true;

$wgGLAuthoritativeMode = true;

$wgGroupPermissions['*']['autocreateaccount'] = true;

$wgInvalidUsernameCharacters = '\|';

$wgUserrightsInterwikiDelimiter = '\|';


Electron.rotoscope (talkcontribs)

Sorry I should mention the error I'm getting is "The supplied credentials are not associated with any user on this wiki."

Electron.rotoscope (talkcontribs)

For anyone looking in the future, the solution I've found that seems to work is:

Put // ahead of $wgGLReplaceMWLogin = true; if you have it in your settings and it's actually working (actually it stopped working for me, anyone know why?)

Login as an admin account

From Special:SpecialPages go to Create account (Special:CreateAccount) and make an account with any username and a password no-one ever need use

Get the user to go to https://picasaweb.google.com while signed in, it should redirect to a URL with a 21 digit number at the end

From Special:SpecialPages go to Manage GoogleLogin connections (Special:ManageGoogleLogin), remove a number if currently associated, and add the number from that picasa address

The user should now be able to login with the google login button

If it asks you to run the updatePublicSufficArray and you're not used to running php scripts, you need to SSH onto the server and run the command (assuming your path is www/www) php www/www/extensions/GoogleLogin/maintenance/updatePublicSuffixArray.php