Last modified: 2013-05-07 07:13:04 UTC
I have two mediawiki installations (I want to use one for public content and one for private content that cannot be read by anyone). However, for both wikis I like to use the same user table. Therefore I use $wgSharedDB = 'thePublicWikiDB' in the LocalSettings of the private wiki and close registration for the public wiki once all wanted users have registered. The OpenID extension is installed for both wikis. The actual problem that I encountered with this setup and the OpenID extension: The login works for the public wiki but not for the private wiki (which uses the user table of the other wiki). Is the OpenID extension not built for such a case? Do I have to configure something such that OpenID is aware of the shared user table?
Below are the versions I use: OpenID (Version 1.004 20120427) MediaWiki 1.19.1 PHP 5.3.3 (apache2handler) MySQL 5.0.95
I have never implemented shared wikis with a single user table. What is your OpenID Provider, a problem is known for Google, as Google OpenIDs are distinct for different RP. So this might cause your problem. Try to use a different OpenID provider for the second wiki entry. I suggest you use Verisign https://pip.verisignlabs.com (or Yahoo), which you then connect with the same user in your wiki. Or try this: + login with your OpenID to your first wiki. (you said, it works) + open a new tab and LOG OUT your OpenID identity on the provider (you will stay logged in to your wiki as this has set you a user account cookie, as you know) + close the OpenID provider tab (where you just logged out) + open a new tab, and navigate to your second wiki (you are not yet logged in there) + start login sequence to your second wiki Does it work ? General advice when testing OpenID extension: ============================================= + always fully fully out from ALL OpenID providers, close their windows. + Delete all cookies and session history in your browser. (You do not have to clear passwords). + once a new OpenID authentication is triggered, it will start new login sequences. This is always a goog starting point for testing.
-
s/goog/good/
by the way, I suggest to run MediaWiki "master" from git
> Or try this: > + login with your OpenID to your first wiki. (you said, it works) > + open a new tab and LOG OUT your OpenID identity on the provider (you will > stay logged in to your wiki as this has set you a user account cookie, as you > know) > + close the OpenID provider tab (where you just logged out) > + open a new tab, and navigate to your second wiki (you are not yet logged in > there) > + start login sequence to your second wiki > > Does it work ? That works because both wikis are on the same domain and I have the $wgCookieDomain set accordingly. I don't even have to start the login sequence on the second wiki. The problem still persists when a user wants to login on the second wiki before visiting the first wiki.
I worked around the problem by changing the second wiki as follows: - Adapted MediaWiki:Loginreqpagetext to link to the login of the first wiki with returnto parameter back to second wiki - Removing the login button in the top for the second wiki as described here: http://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_remove_the_.22Create_an_Account_or_Login.22_link_at_the_top_right_of_the_screen.3F Tried to adapt the variables $personal_urls['anonlogin'], personal_urls['createaccount'] of the example code to reflect the login of the first wiki with return to the second wiki. $personal_urls['anonlogin'] = 'link'; Couldn't figure out how to do it. Assuming that no other login links exist, with this workaround I hope the problem is sufficiently dealt with. If you know that this might cause other problems please let me know. Thanks for your great help!
Do I understand correctly, that with the mentioned changes your problem is solved, and that it can be closed as resolved (then pls. close).
So you have shared users but you can't log in with openid on the other wiki. Sounds like you never added the table the openid extension stores openids in to $wgSharedTables so it's only accessible from one wiki.
(In reply to comment #9) > So you have shared users but you can't log in with openid on the other wiki. > > Sounds like you never added the table the openid extension stores openids in to > $wgSharedTables so it's only accessible from one wiki. Good idea, and a good hint. Yes, this may be the problem. Question to experts of shared wiki installation: In shared wiki installations, shouldn't the user_openid table be also shared ? If the user table is share, the OpenID must also be shared (as far as I understand, I may be wrong. As mentioned above, I am not an expert in shared-wikis. Never installed some). Updating: php $IP/maintenance/update.php --help shows you the options to update the first and the second wiki database Here is what I always use when updating: php update.php --dbuser <dbrootusername> --dbpass <dbrootpassword> --conf <path -to-localsettings-of-each-of first-or-second-wiki.php
Thanks for the hint. Tried it like this, did however not solve the issue. $wgSharedDB = 'db_of_first_wiki'; $wgSharedTables = array("user", "user_groups", "user_openid"); Also running a php update.php didn't help.
@ Simone: Can this be closed ?