Page MenuHomePhabricator

Unable to Integrate Google Login Extension
Closed, InvalidPublic

Description

Hi Florian

I am using MediaWiki Version 1.27.4 (LTS) with the compatible Google Login extension 0.4.0. I tried integrating the plugin with my application but still I am unable to do so below are the steps that I followed.

Step 1: Extract GoogleLogin Folder in extensions folder in my document root
Step 2: Create a new API Project in my google console under APIs and enable Google+ API along with OAuth where APPLICATION TYPE, JavaScript origins.

Authorized JavaScript origin: wiki.domain.com
Authorized redirect URIs: http://domain.com/index.php/Special:GoogleLoginReturn

Step 3: Updated below settings in my LocalSettings.php with respective OAuth Credentials

require_once "$IP/extensions/GoogleLogin/GoogleLogin.php";
$wgGLSecret = 'TpWP_YD0HHF16F!6d6dwc1';
$wgGLAppId = '1354052311hsavyts2ff9-2f27-272gd27.apps.googleusercontent.com';

Step 4 : Run php update.php

Step 5: Checked logging in via my Gmail Account but the below error

image.png (708×654 px, 58 KB)

Note: My Mediawiki installation is open, not private.

regards,
Vishal Shinde

Event Timeline

Florian removed Florian as the assignee of this task.
Florian subscribed.

Hi! Thanks for reporting this. However, this is not a bug, as it works like expected. As you haven't connected your Google-account with any local wiki account so far, GoogleLogin doesn't know which user to login with this google account. So, first login with your username and password and then navigate to Special:LinkAccounts. Click the "link with Google account" button. If that was successful, logout and try to login with your Google account, which should work now.

Some meta things:

  1. Please do not ask questions or for support in phabricator (which is for bugs and tasks only), you can use https://www.mediawiki.org/wiki/Extension_talk:GoogleLogin to get support :)
  2. Please never ever post your private identification material provided to you by Google (in this case your app ID and secret), use some meaningless data instead (like 12345 or whatever). To fix this now (as your secrets are now public visible), delete your oauth credentials in your google developer console and create a new pair, just to be save :)