Extension talk:GoogleLogin

Jump to navigation Jump to search

About this board

Missing Id_token and setAccessToken

2
GuardianCosmos (talkcontribs)

Getting the following error with everything configured according to documentation, wondering if the latest build has a typo or similar that could be causing this? The accounts are already properly linked.

Mediawiki version 1.31.2 and plugin version 0.4.0-git

[127ff4480901c5e4d43dc2c0] /mediawiki/index.php/Special:LinkAccounts LogicException from line 712 of /var/lib/mediawiki/extensions/GoogleLogin/vendor/google/apiclient/src/Google/Client.php: id_token must be passed in or set as part of setAccessToken

Backtrace:

#0 /var/lib/mediawiki/extensions/GoogleLogin/includes/Auth/GooglePrimaryAuthenticationProvider.php(263): Google_Client->verifyIdToken()

#1 /usr/share/mediawiki/includes/auth/AuthManager.php(1950): GoogleLogin\Auth\GooglePrimaryAuthenticationProvider->continuePrimaryAccountLink(User, array)

#2 /usr/share/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(364): MediaWiki\Auth\AuthManager->continueAccountLink(array)

#3 /usr/share/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)

#4 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(660): AuthManagerSpecialPage->handleFormSubmit(array, OOUIHTMLForm)

#5 /usr/share/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(416): HTMLForm->trySubmit()

#6 /usr/share/mediawiki/includes/specials/SpecialLinkAccounts.php(59): AuthManagerSpecialPage->trySubmit()

#7 /usr/share/mediawiki/includes/specialpage/SpecialPage.php(565): SpecialLinkAccounts->execute(NULL)

#8 /usr/share/mediawiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#9 /usr/share/mediawiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)

#10 /usr/share/mediawiki/includes/MediaWiki.php(861): MediaWiki->performRequest()

#11 /usr/share/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()

#12 /usr/share/mediawiki/index.php(42): MediaWiki->run()

#13 {main}

@Florianschmidtwelzow

Florianschmidtwelzow (talkcontribs)

Hi!

Thanks for pointing this out, I tried to recreate this issue, however, I was unable to do so. Did you really have installed the latest versions and also updated the composer dependencies? From what I saw in the code, this behaviour should be nearly impossible to reach (that's also why there's a logic exception). Did you tried to link the account again?

Thanks in advance for your answer :)

Best, Florian

Reply to "Missing Id_token and setAccessToken"
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

Reply to "How to manually create account"

GooglePrimaryAuthenticationProvider not found

3
Summary by Florianschmidtwelzow

Missing use/import of GoogleLoginPrimaryAuthenticationProvider class.

144.208.212.18 (talkcontribs)

Hi,


I am running MediaWiki 1.33 with docker. When adding GooglePrimaryAuthenticationProvider as my primary provider to enable account creation, I get the error:


Fatal error: Uncaught Error: Class 'GooglePrimaryAuthenticationProvider' not found in /var/www/html/vendor/wikimedia/object-factory/src/ObjectFactory.php:77 Stack trace: #0 /var/www/html/includes/auth/AuthManager.php(2311): Wikimedia\ObjectFactory::getObjectFromSpec(Array) #1 /var/www/html/includes/auth/AuthManager.php(2364): MediaWiki\Auth\AuthManager->providerArrayFromSpecs('MediaWiki\\Auth\\...', Array) #2 /var/www/html/includes/auth/AuthManager.php(922): MediaWiki\Auth\AuthManager->getPrimaryAuthenticationProviders() #3 /var/www/html/includes/skins/SkinTemplate.php(705): MediaWiki\Auth\AuthManager->canCreateAccounts() #4 /var/www/html/includes/skins/SkinTemplate.php(463): SkinTemplate->buildPersonalUrls() #5 /var/www/html/includes/skins/SkinTemplate.php(228): SkinTemplate->prepareQuickTemplate() #6 /var/www/html/includes/OutputPage.php(2723): SkinTemplate->outputPage() #7 /var/www/html/includes/exception/MWExceptionRenderer.php(134): OutputPage->output() #8 /var/www/html/includes/exception/MWExceptionRenderer.php(53): in /var/www/html/vendor/wikimedia/object-factory/src/ObjectFactory.php on line 77

I am using the latest code from your git I guess and install the extension that way:

From mediawiki:latest

RUN git clone --depth 1 -b master \

      https://gerrit.wikimedia.org/r/p/mediawiki/extensions/GoogleLogin \

      /var/www/html/extensions/GoogleLogin

RUN cd /var/www/html/extensions/GoogleLogin/ && composer install --no-dev


I can see the GooglePrimaryAuthenticationProvider file in includes/Auth.


In my LocalConfig I have set


$wgAuthManagerConfig = [

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

];


Thanks!

Florianschmidtwelzow (talkcontribs)

Hi! Thanks for posting here :) First of all, this looks like you missed something. The GoogleLogin Code is actually part of a namespace (GoogleLogin\Auth), so you can not simply use GooglePrimaryAuthenticationProvider::class without specifying it with a fully-qualified namespace, or importing it. So, in your case, it should be enough to add the following line at the top of your LocalSettings.php right after the starting php tag (<?php):

use GoogleLogin\Auth\GooglePrimaryAuthenticationProvider;

Let me know if that worked!

Philuko (talkcontribs)

Thanks, works like a charm!

Automatically register anyone who logs-in with a Google account

5
Domtron vox (talkcontribs)

Is there a way to make the plugin or AuthManager automatically register wiki accounts for people logging in with google accounts for the first time? I searched for this and couldn't find anything, but a generic remote user extension that has an auto register option, but no clue how hard it would be to get working with google accounts.

I would like for anyone in the company to seamlessly login without needing to stop and create an account.

Thanks!

Info Dump:

I have the wiki login restricted to certain custom gmail domains.

Hosted on reseller cPanel/WHM

PHP 7.0

MediaWiki 1.30 (Installed with cPanel one click install)

GoogleLogin Version file: GoogleLogin: REL1_30 2017-09-21T22:09:00 f594074

Domtron vox (talkcontribs)

Realized this is really important because anyone can still register an account using the registration field. I want to Disable normal mediawiki login process using the $wgAuthManagerAutoConfig['primaryauth'] = []; config but then users can't register their google account via the Special:CreateAccount page since it is effectivly removed when the GoogleLogin login setup takes over. :/

Am I missing something? I've read the wiki page and this discussion page multiple times and just can't figure out what I'm doing wrong.

Florianschmidtwelzow (talkcontribs)

Hi, this is currently not possible (at least not from the UI, see more in the second section of my answer), sorry :( The difference with GoogleLogin and the Auth_remoteuser extension is, that GoogleLoign actually is an authentication provider. It gives MediaWiki an additional way to authenticate a specific user inside of MediaWiki. On the other hand, Auth_remoteuser is a so called SessionProvider. It provides a possibility to get a session based on a specific environment variable, so the user does not need to authenticate with MediaWiki, the user is coming from a different source.

There's actually the task T138678 which goal it is to provide a way to auto-create a new wiki-user if no user already exists when using an authentication provider other than MediaWiki's own one. However, we're currently not really actively working on it :( The AuthManager already provides a way of automatically linking an account when someone if logging in the first time, however, it's not yet exposed in the UI.

Jsmith6 (talkcontribs)

Florianschmidtwelzow, this is great information. Thank you.

The main issue that I am having is that once new users are authorized in our wiki, their wiki account should get linked to their Google account once they login. But instead, they get the error message "The supplied credentials are not associated with any user on this wiki".

We are not trying to create a wiki account upon authentication with Google, but simply to link an existing wiki account with an existing Google account.

Above, you said: "The AuthManager already provides a way of automatically linking an account when someone if logging in the first time, however, it's not yet exposed in the UI."

Could you please advise how to avail ourselves of this?

Chabamkazam (talkcontribs)

Was a solution ever found to this? I am having the exact same problem described by Jsmith6, but have been unable to figure out how to do this

Reply to "Automatically register anyone who logs-in with a Google account"

Manually creating a user in preparation?

5
Mqw190238 (talkcontribs)

Hello

I understand the restriction with not being able to auto create MediaWiki accounts using this extension now. That is not what this is about. How do you manually create a MediaWiki user before hand though to link the Google account to if you only have Google Login auth enabled?

If I go to /Special:CreateAccount and enter a username, ie. "Joe Bloggs" I get the error "Your Google account is already linked to another user. Please unlink the connection or contact an administrator, if you have no other wiki account." when I click on the only button I have "Create with Google". Here lies the issue I think because what is that trying to do, that button and message makes no sense? I just want to create a local user to then link them up via /Special:ManageGoogleLogin. I am not trying to do anything with mine (yes of course it's already linked).

I have $wgAuthManagerAutoConfig['primaryauth'] = []; and $wgGroupPermissions['*']['createaccount'] = false; so I think it is not allowing local creation because of that on /Special:CreateAccount? I do not want users to log in with local authentication though.

So how do you create local accounts to link Google accounts to for log in while not allowing local logins? Or I have misunderstood?

Currently I get around this manually by in the database adding a new row to the user table, then using /Special:ManageGoogleLogin to link that user and Google ID. Surely I should be able to do this all via the web UI though?

Edit: Apologies, forgot version details:

MediaWiki 1.32.0

GoogleLogin 0.4.0-git (0b27530)

Many thanks!

Florianschmidtwelzow (talkcontribs)

Hi! I might have difficulties to get the actual problem and your setup, please, if the answer does not help you, try to give some more streamlined information and please just provide necessary information which might help in this case :)

If I understood you correctly you want to have the following setup:

  • GoogleLogin is the only available authentication provider
  • Logins and account creation should be possible with Google only

If that's the case, your problem might be related to the fact, that you disabled account creation at all for every not-logged in user. You need to allow an anonmyous user to be able to login by setting $wgGroupPermissions['*']['createaccount'] = true; in your LocalSettings.php. You'll disable account creation without GoogleLogin by disabling all available authentication providers, except GoogleLogin. This can be done by adding this to your LocalSettings.php:

$wgAuthManagerConfig = [

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

];

Then you should be able to login with your Google account only. Account creation is also possible with your Google account.

Btw.: There's also this task to automatically create an account when a local account for the Google account does not exist, it is, however, not implemented, yet: https://phabricator.wikimedia.org/T186080

Please let me know, if there're still open questions :)

Best, Florian

Florianschmidtwelzow (talkcontribs)
81.61.169.155 (talkcontribs)

Hi! I followed the steps for the authoritative mode, but I still get the same problem. How do I accomplish this?:


  • GoogleLogin needs to be the only primary authentication provider


The code you posted up here returns this error:

Fatal error: Uncaught Error: Class 'GooglePrimaryAuthenticationProvider' not found in /homepages/14/d387179246/htdocs/pruebawiki/vendor/wikimedia/object-factory/src/ObjectFactory.php:77 Stack trace: #0 /homepages/14/d387179246/htdocs/pruebawiki/includes/auth/AuthManager.php(2311): Wikimedia\ObjectFactory::getObjectFromSpec(Array) #1 /homepages/14/d387179246/htdocs/pruebawiki/includes/auth/AuthManager.php(2364): MediaWiki\Auth\AuthManager->providerArrayFromSpecs('MediaWiki\\Auth\\...', Array) #2 /homepages/14/d387179246/htdocs/pruebawiki/includes/auth/AuthManager.php(922): MediaWiki\Auth\AuthManager->getPrimaryAuthenticationProviders() #3 /homepages/14/d387179246/htdocs/pruebawiki/includes/skins/SkinTemplate.php(705): MediaWiki\Auth\AuthManager->canCreateAccounts() #4 /homepages/14/d387179246/htdocs/pruebawiki/includes/skins/SkinTemplate.php(463): SkinTemplate->buildPersonalUrls() #5 /homepages/14/d387179246/htdocs/pruebawiki/includes/skins/SkinTemplate.php(228): SkinTemplate->prepareQuickTemplate() #6 /homepages/14/d38717 in /homepages/14/d387179246/htdocs/pruebawiki/vendor/wikimedia/object-factory/src/ObjectFactory.php on line 77

Thanks!

Florianschmidtwelzow (talkcontribs)

Hi!

What exactly is the configuration you added to your LoclSettings.php? And did you actually get a new copy of GoolgeLogin in the latest development version "master"?

Best, Florian

Reply to "Manually creating a user in preparation?"

The supplied credentials are not associated with any user on this wiki. (1.33)

2
125.236.194.84 (talkcontribs)

Hi Florian,

These are my wiki specs below:

Product Version
MediaWiki] 1.33.0
7.2.19-0ubuntu0.18.04.2 (apache2handler)
5.7.27-0ubuntu0.18.04.1

And I'm trying to enable Authoritative Mode for Google Login as described here. This is what I currently have in my LocalSettings.php:

$wgGLSecret = '-';
$wgGLAppId = '-';
$wgGLAllowedDomains = array( 'url.com' );
$wgGLAllowedDomainsStrict = 'true';
$wgWhitelistRead = array( 'Special:GoogleLoginReturn' );
$wgGLAuthoritativeMode = 'true';
$wgGroupPermissions['*']['autocreateaccount'] = true;
$wgUserrightsInterwikiDelimiter = "%";
$wgInvalidUsernameCharacters = "%";$wgShowExceptionDetails = 'true';

But when I try and log in with Google, it simply states the supplied creds are not associated with any user - which I expect but am I wrong in thinking that because I have authoritative mode enabled - it should then automatically create the new account since its not linked with a local mediawiki account?


Keen to hear your thoughts.

Florianschmidtwelzow (talkcontribs)

Hi,

are you using the REL1_33 release branch of Google Login? If so, this version does not support the authoritative mode. You would need to download a new copy of GoogleLogin using the latest development version "master" in order to get this feature :-)

Best, Florian

Reply to "The supplied credentials are not associated with any user on this wiki. (1.33)"
Pguallar (talkcontribs)

Hi!


I am using the GL extension. If my wiki is public, it works like charm. I can register new accounts using the google login, which afterwards perfectly work by logging in.


If I uncomment this line:

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


Then I can only login with Google Login, but I cannot create new accounts. I added these lines:

$wgWhitelistRead = array( 'Especial:Entrar', 'Especial:GoogleLoginReturn', 'Especial:Crear_una_cuenta', "MediaWiki:Common.css", "MediaWiki:Common.js");

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


But I still have the same problem. I can get to the register page, then it redirects me to google login, but when clicking on my account, I go back to the "Login required" page, and the account isn't created.


Thanks a lot!


Florianschmidtwelzow (talkcontribs)

Hi!

What is the exact URL you get redirected to? Probably you need to whitelist "Special:GoogleLoginReturn" as well?

Best, Florian

Reply to "Whitelisting account creation"
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"

The supplied credentials are not associated with any user on this wiki

32
Summary by Florianschmidtwelzow
116.68.122.50 (talkcontribs)

Installed mediawiki + GoogleLogin in subdomain http://demo.domainname.com

and added the following in LocalSettings.php

require_once "$IP/extensions/GoogleLogin/GoogleLogin.php";

$wgGLSecret = 'secret key added';

$wgGLAppId = 'client ID added';

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

$wgGLAllowAccountCreation = true;

But when i click the Login with Google button its showing

" The supplied credentials are not associated with any user on this wiki "

Florianschmidtwelzow (talkcontribs)

What version of MediaWiki and GoogleLogin do you use?

116.68.120.54 (talkcontribs)

MediaWiki   1.27.0

GoogleLogin: REL1_27

Florianschmidtwelzow (talkcontribs)

GoogleLogin for MediaWiki 1.27 does not support the "wgGLAllowAccountCreation option anymore. Please see the Extension:GoogleLogin/PostAuthManager page for setup and configuration instructions of this new version. If you want to have the old version, you can download it from here and test, if it works fine with MediaWiki 1.27.

184.68.85.26 (talkcontribs)

Why did they remove this functionality??? Was it a security vulnerability??? Where are the release notes??? I want to roll back to an older version but do not want to compromise security.

Thanks.

Florianschmidtwelzow (talkcontribs)

In fact, I removed this functionaliyt because I migrated the extension to be a plugin for the new AuthManager authentication system of MediaWiki, which now handles all this stuff. So, it wasn't removed because of secutiry concerns. However, re-adding the functionality to AuthManager (tracked in task T138678 and task T141474) will probably be done later, as we've to clarify, what security topics and use case we need to cover :) You can, however, install an older version of GoogleLogin to have the function back as it was before I migrated the extension.

184.68.85.26 (talkcontribs)

I appreciate your speedy response. We have decided to just do the manual creation for now. I look forward to this functionality returning in a future release :)

Thanks again for your response.

-Cheers

100.35.144.85 (talkcontribs)

The link to Extension:GoogleLogin/PostAuthManager above is broken. How do I link an existing Wiki user to their Google Apps account? I was hoping it would happen automatically via email address but I get the "supplied credentials are not associated" error. (thanks for any information)

72.66.110.252 (talkcontribs)

Have the user login locally, go to the special page and look for Link accounts under Users and rights. It'll let you link it in there.

65.183.224.21 (talkcontribs)

There's a special page "Special:ManageGoogleLogin" that allows an admin to delete links to Google accounts and manually input the user's Google+ ID.

116.68.121.246 (talkcontribs)

Downloaded and installed google login from below url

https://www.mediawiki.org/wiki/Special:ExtensionDistributor/GoogleLogin

Updated with LocalSettings.php with following

require_once "$IP/extensions/GoogleLogin/GoogleLogin.php";

$wgGLSecret = 'xxxx';

$wgGLAppId = 'xxxxxxx.apps.googleusercontent.com';

Still showing

The supplied credentials are not associated with any user on this wiki.

Florianschmidtwelzow (talkcontribs)

Yes, like I said: GoogleLogin for MediaWiki 1.27 does not allow you to register an account with Google anymore (at least not in the way you expect, it seems). If you want the option to create a new wiki account, if the google account is not connected with one already, you need to use an older version (which I linked in my answer before this one). Otherwise, you first have to create a wiki account and then connect it with your google account in order to login with your google account.

116.68.120.102 (talkcontribs)

Installed older version (https://github.com/wikimedia/mediawiki-extensions-GoogleLogin/archive/v0_3_1.zip)

Error showing

[V8z-QsBjyVwAAEQnY3QAAAAI] /index.php?title=Special:GoogleLogin MWException from line 463 of /home/fwhtesta/public_html/extensions/GoogleLogin/includes/GoogleLogin.body.php: GoogleLogin requires the PHP API Client, which you can install with the Extension:GoogleAPIClient or by running composer update.

GoogleAPIClient already installed. See the screenshot http://i.imgur.com/iW6205h.jpg

Florianschmidtwelzow (talkcontribs)

Could you please run composer update in the GoogleLogin directory?

116.68.122.66 (talkcontribs)
Florianschmidtwelzow (talkcontribs)
116.68.123.54 (talkcontribs)

Composer updated, see the screenshot blob:http://imgur.com/69b6a104-838e-4d0f-b126-f7510e91d3e3

But still showing error

Error: redirect_uri_mismatch

Application: mediawiki

You can email the developer of this application at: mail@domainname.com

The redirect URI in the request, http://domainname.com/index.php?title=Special:GoogleLogin, does not match the ones authorized for the OAuth client. Visit https://console.developers.google.com/apis/credentials/oauthclient/xxxxxx.apps.googleusercontent.com?project=xxxxx to update the authorized redirect URIs.

What we need is allow user to signup with google email ids, don't want users create accounts like they normally do.

Florianschmidtwelzow (talkcontribs)
This post was hidden by 116.68.120.130 (history)
116.68.120.130 (talkcontribs)

Its working fine now. Thank you.

Zeropash (talkcontribs)

I have installed the GoogleLogin version GoogleLogin-REL1_27-d7127e6.tar.gz, ran composer update.

I have set

$wgGLSecret, $wgGLAppId , $wgGLAllowedDomains = array('<mydomain.com>');

$wgGLAllowedDomainsStrict = true;

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

$wgAuthManagerAutoConfig['primaryauth'] = [];

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

also as this is a private wiki I have set $wgGroupPermissions['*']['read'] = false;

When I am in a browser where i am logged in to Google Apps , media wiki logs me in.

however if i am not logged in it give me the error "The supplied credentials are not associated with any user on this wiki."

Any idea where i could be going wrong?

Florianschmidtwelzow (talkcontribs)

Please make sure, that you're not logged in with another account, e.g. by navigating to accounts.google.com.

Monikajayanna (talkcontribs)

Hi all, i have configured mediawiki-1.28, php-5.5.9 with nginx-1.4.6 now i am adding google login, i have followed this doc Extension:GoogleLogin/PostAuthManager for google login and after logged in with google account i am getting this error "The supplied credentials are not associated with any user on this wiki"

my LocalSettings.php contain

require_once "$IP/extensions/GoogleLogin/GoogleLogin.php";

$wgGLSecret = ' ';

$wgGLAppId = ' ';

require_once "$IP/extensions/GoogleAppsAuthentication/GoogleAppsAuthentication.php";

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

$wgAuthManagerAutoConfig['primaryauth'] = [];

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

$wgGLAllowAccountCreation = true;

$wgGLReplaceMWLogin = true;

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

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

$wgGroupPermissions['user']['edit'] = true;

$wgGroupPermissions['user']['edit'] = true;

190.0.10.90 (talkcontribs)

Im try to downgrade GoogleLoggin to 1.23 and does'nt work , the web browser display the follow error in the console (Unexpected token '<') im think that the package contains a syntax error but i dont find it.

MediaWiki 1.27.0 + GoogleLogin 1.27 does´nt work

MediaWiki 1.27.0 + GoogleLogin 1.23 does´nt work

What is a possible solution for implemment auth with Google in MediaWiki 1.27?

67.249.141.76 (talkcontribs)

Any update on progress for the account creation via Google Login?

Florianschmidtwelzow (talkcontribs)

> Im try to downgrade GoogleLoggin to 1.23 and does'nt work , the web browser display the follow error in the console (Unexpected token '<') im think that the package contains a syntax error but i dont find it.

Please load the page with ?debug=true appended to the URL, however, this doesn't look like an error from GoogleLogin, GoogleLogin does not load JavaScript on the login page, so there's no reason why it would throw an error like this.

> Hi all, i have configured mediawiki-1.28, php-5.5.9 with nginx-1.4.6 now i am adding google login, i have followed this doc Extension:GoogleLogin/PostAuthManager for google login and after logged in with google account i am getting this error "The supplied credentials are not associated with any user on this wiki"

Yes, this is correct. You need to link a user with the Google account. So, first create a local wiki account and use Special:LinkAccounts to link the account to Google.

> Any update on progress for the account creation via Google Login?

Nope, please see the linked tasks for the account creation progress :)

Cbordolli (talkcontribs)

Good, I'm trying to leave configured Goole Login in mediawiki 1.28. What extensions are required for that? I need to be able to create accounts from google Login. I await your comments. Thank you

87.236.134.114 (talkcontribs)

Hello,

Hoping you can help me out here, Installed MediaWiki 1.29, then installed GoogleLogin-REL1_28-e5b5adc.tar.gz. When logging in via google it complains about "The supplied credentials are not associated with any user on this wiki"

Please advise what I should do, I don't want users in my organisation to have to register and link there Google accounts. I'd like for them to login and an account to be created on first login.

you can contact me on arjun@what3words.com if I have missed anything....

# Custom added configs

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

$wgGLSecret = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';

$wgGLAppId = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';

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

$wgAuthManagerAutoConfig['primaryauth'] = [];

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

$wgGLAllowAccountCreation = true;

$wgGLReplaceMWLogin = true;

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

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

$wgGroupPermissions['user']['edit'] = true;

$wgGroupPermissions['user']['edit'] = true;

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

Thanks Arjun

14.231.194.225 (talkcontribs)

Hi, did you still need help on this problem ?

I just setup mediawiki with google login and have same problem but i have fixed it.

206.252.195.66 (talkcontribs)

I think this is a common request, so if you have solved the problem, please describe your solution here.

14.142.151.178 (talkcontribs)

Please let me know the solution for this problem "The supplied credentials are not associated with any user on this wiki"

81.61.169.155 (talkcontribs)

I would like a solution for it! I am having the same problem

Reply to "The supplied credentials are not associated with any user on this wiki"

Fatal exception on Special:SpecialPages when not logged in

3
Xilumosx (talkcontribs)

Hi there,

I'm running Mediawiki & GoogleLogin 1.32 and when I visit Special:SpecialPages I get a fatal exception:

[exception] [48945901ebb70f1815ffbda2] /wiki/Special:SpecialPages   TypeError from line 19 of /var/www/w/extensions/GoogleLogin/includes/GoogleIdProvider.php: Argument 1 passed to GoogleLogin\GoogleIdProvider::getFromUser() must be an instance of User, boolean given, called in /var/www/w/extensions/GoogleLogin/includes/Auth/GooglePrimaryAuthenticationProvider.php on line 106

If I log in, I am able to see the page without error.

I've tried deleting and reinstalling GoogleLogin.

Many thanks

Florianschmidtwelzow (talkcontribs)

Oha, thanks for pointing to this! I created a task for that, see task T228445.

Florianschmidtwelzow (talkcontribs)

Btw.: This is already merged some time ago and fixed :)