Jump to content

Extension talk:GoogleAppsAuthentification/Flow

About this board

Redirecting to login page after login

4
208.97.104.194 (talkcontribs)

I was having an issue where after logging in from the home page, mediawiki would bring you straight back to the login page with a username and password field.

So I modified this code:

       // Return URL
       $config['return_server'] = (isset($_SERVER["HTTPS"]) ? 'https://' : 'http://') .$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'];
       $config['return_url'] = $config['return_server'].$_SERVER['REQUEST_URI'];

to

       // Return URL
       $config['return_server'] = (isset($_SERVER["HTTPS"]) ? 'https://' : 'http://') .$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'];
       if ($_REQUEST["title"] == $lg->specialPage("Userlogin")) {
               $config['return_url'] = $config['return_server'].$_SERVER['SCRIPT_NAME'];
       }
       else {
               $config['return_url'] = $config['return_server'].$_SERVER['REQUEST_URI'];
       }

This resolved my issue.

5.28.71.149 (talkcontribs)

Thanks! Had the same issue. (MW1.19.1) However you missed one simple line.

Before the code above add: $lg = Language::factory($wgLanguageCode);

Otherwise you get a blank page. (Or PHP-Error of unknown $lg, depending on your debug settings.)

Additionaly, after Login I get a dialog asking if I wanted to purge the cache of the mainpage. (Usually only NOT logged in users should get that.) Fixed it by changing:

$wgOut->redirect($url."?action=purge");

to

$wgOut->redirect($url."?action=view");

Have to wait and see if there are serious isuess with with not-current mainpages.

Dyspatch (talkcontribs)

I am still working through some issues here, but two modifications are already apparent to the above.

  1. You need to also specify the global variable, $wgLanguageCode, at the top of the getGoogleAccount function.
  2. The "?action=view" is not the proper query string syntax. It needs to be an "&" instead of a "?".

That all being said, I am noticing issues with this implementation when it comes to logging in from pages that aren't the main page. I'll update this once I've worked through those issues.

45.116.117.148 (talkcontribs)

when i open my wiki URL then by default it shows Main page Not shows Login page how to do this

Means When i open URL The login page should open first not Main page

Reply to "Redirecting to login page after login"

Fatal error: Call-time pass-by-reference has been removed

2
Vrghost1 (talkcontribs)

Set up to use this one, but as soon as I try to log in I get

Fatal error: Call-time pass-by-reference has been removed in ..wiki/extensions/GoogleAppsAuthentication/Auth/Yadis/Manager.php on line 416

This seems to be an issue that other people have had, but can't find any solution

206.71.236.138 (talkcontribs)

Remove ampersand from that line.

Reply to "Fatal error: Call-time pass-by-reference has been removed"
206.108.165.248 (talkcontribs)

After installation when I click to login, I get a blank page. Any idea?

206.108.165.249 (talkcontribs)

Error log post.

[08-Sep-2014 21:23:55 America/Detroit] PHP Fatal error: Call-time pass-by-reference has been removed in /home/leobaeck/public_html/wiki/extensions/GoogleAppsAuthentication/Auth/Yadis/Manager.php on line 416

206.71.236.138 (talkcontribs)

Remove ampersand from that particular line.

Reply to "Blank page"

Error with auth request

2
181.29.27.39 (talkcontribs)

Hi, i am getting this error:

Auth request object error. Try again

Is this probably related to the variable in LocalSettings.php, 'GoogleAppsDomain'?? i've set it this way:

$wgDefaultUserOptions['GoogleAppsDomain'] = 'google.com/a/myDomain.com';

Thanks in advance!

This post was posted by 181.29.27.39, but signed as Daniel.SL.

205.251.160.140 (talkcontribs)

The variable 'GoogleAppsDomain' should have the domain you want to allow logins from. e.g. I only want google accounts with domain example.com to login, such as mom@example.com or dad@example.com:

$wgDefaultUserOptions['GoogleAppsDomain'] = 'example.com';

This way, jimmy@gmail.com won't be authenticated.

Reply to "Error with auth request"
220.255.2.28 (talkcontribs)

I would like to know about the permission in the mediawiki, if I use this extension let say: sysops,beaurecrat,....

This post was posted by 220.255.2.28, but signed as 220.255.2.25.

Reply to "Permission"

"Endlessly" persistant logins

3
Jme2390 (talkcontribs)

Great plugin, it solves one of the missing pieces in our Google Apps login project.

With that said, it seems that while users can logout successfully, they can also log back in without being logged in to Google Apps.

Say I login to my MediaWiki install (whether or not I'm logged into Apps already) and I end up back at Main_Page. If I click log out, I'm logged out and everything is peachy keen. Now, if I'm also logged out of Apps at this point, I can log right back in just by clicking the log in link in the header. That is to say, I don't need to be logged into Apps again to actually authenticate to the wiki; it lets me right back in. I'm not sure what's going on here, I suspect it has to do with the temp files, but erasing them isn't solving the issue. On the off chance it was OS or browser specific, several have been tried (Safari, Chrome, Firefox, on Windows and OS X - all latest versions as of this writing). The (Apache on Debian) web server user has full r/w permissions to the tmp directory and subdirectories.

If you have any insight as to how to solve this "endlessly" persistent login problem, that would be greatly appreciated. We've come up empty handed thus far.

Thanks!

122.201.18.43 (talkcontribs)
Willcwf (talkcontribs)
$wgHooks['UserLogout'] = array('fnUnsetLoggedInUser');

function fnUnsetLoggedInUser() {
        session_unset();
        return true;
}

this works if you're logged out of google

Reply to ""Endlessly" persistant logins"

Redirect to login page after login

2
Koemski (talkcontribs)

(The solution outlined in 2012 further down this page doesn't work with mw 1.22)

After login I get redirected to the mediawiki login page. How can I get redirected to the page I was before or maybe the main page?

thx, Karsten PS: I use mw1.22.5

Reply to "Redirect to login page after login"

How do I make myself administrator?

5
79.218.125.106 (talkcontribs)

Hi,

ok, now I'm logged in ... but how do I make myself an administrator or bureaucrat?

Best, Karsten

Jasper Deng (talkcontribs)

There should be a non-Google-Apps default account that you setup when you initially installed MediaWiki.

93.218.115.162 (talkcontribs)

When using GoogleAppsAuthentification you cannot login with another user. There is no other login screen than the google-oAuth screen.

Jasper Deng (talkcontribs)
Koemski (talkcontribs)
  • mysql -u root -pPassword databasename
  • select user_id, user_name from user; -- find user_id of user, let's say: 2
  • insert into user_groups values (2, 'sysop'), (2, 'bureaucrat');
  • \q
Reply to "How do I make myself administrator?"

GoogleAppsAuthentication MediaWiki 1.22.1

1
79.189.12.114 (talkcontribs)

Is the extention still valid for MediaWiki 1.22.1? It looks like it doesn't work anymore.

Reply to "GoogleAppsAuthentication MediaWiki 1.22.1"

Suggestion / Has any : set this up for multipel domains

2
50.137.193.149 (talkcontribs)

Has anyone tried to get multiple domains working for instance gmail.com and somegoogleappaccount.com?

I would think you could just loop through the domains somewhere but I am not sure where. Anyone have an idea?

Jslootbeek (talkcontribs)
Reply to "Suggestion / Has any : set this up for multipel domains"