<p>I have my Wordpress install and MediaWiki <a href="https://stackoverflow.com/questions/33745" title="Thanks ceejayoz">sharing the same login information</a>.  Unfortunately, users need to log into both separately, but at least they use the same credentials.  </p>

<p>What I would like to do is cause a successful login on the Wordpress blog to also cause a login for MediaWiki (ideally both directions).  There are two ways this could happen:</p>

<ol>
<li>Logging in causes a login on the other application (writes the cookie and creates the session in the DB)</li>
<li>Accessing an application checks for the cookie of the other and then automatically logs in.</li>
</ol>

<p>Since the usernames are shared it seems like the latter should be pretty easy to do.  Any tips would be great.  </p>

[{'answer_id': 37368, 'author': 'SCdF', 'author_id': 1666, 'author_profile': 'https://Stackoverflow.com/users/1666', 'pm_score': 1, 'selected': False, 'text': '<p>You could consider some kind of single-sign-on software. I am unaware of any that are free and I\'ve only ever used <a href="http://ca.com/us/internet-access-control.aspx" rel="nofollow noreferrer">SiteMinder</a> which is neither free nor good. <a href="http://www.atlassian.com/software/crowd/default.jsp" rel="nofollow noreferrer">Crowd</a> may be better (but is again not <a href="http://www.atlassian.com/software/crowd/pricing.jsp" rel="nofollow noreferrer">free</a>).</p>\n'}, {'answer_id': 37399, 'author': 'Nikhil', 'author_id': 853, 'author_profile': 'https://Stackoverflow.com/users/853', 'pm_score': 1, 'selected': False, 'text': '<p>I\'ve seen a setup going through <a href="http://www.invisionpower.com/community/board/" rel="nofollow noreferrer">Invision Power Board</a>, using <a href="http://www.ipbwiki.com/" rel="nofollow noreferrer">IpbWiki</a> and a Wordpress integration mod.  Mind you, it\'s expensive and excessive.</p>\n'}, {'answer_id': 37450, 'author': 'The How-To Geek', 'author_id': 291, 'author_profile': 'https://Stackoverflow.com/users/291', 'pm_score': 2, 'selected': False, 'text': '<p>The primary problem you are going to run into is that you\'ll have two login forms, and two logout methods. What you need to do is pick one of the login forms as the default, and redirect the other one over to it.</p>\n\n<p>I\'ve been able to <a href="http://www.howtogeek.com" rel="nofollow noreferrer">successfully integrate</a> bbPress + MediaWiki + WordPress + WordPress MU, but I wrote a lot of custom code to do it.</p>\n\n<p>I\'m using the bbPress login page as the default (and .htaccess rewrite to /login/), and then I created my own MediaWiki authentication plugin (which looks a lot like the one you are using), except my plugin checks the WordPress/bbPress cookie for the login information and automatically logs the user in.</p>\n\n<p>I created a customized /logout/ link that runs the bbPress logout, and also kills the MediaWiki cookies at the same time.</p>\n\n<p>Then the last step was to redirect all of the other logout / login links for bbpress, mediawiki, etc, over to my consolidated one. I used .htaccess rewrites for this rather than mess with core code.</p>\n\n<p>Still a work in progress, but it works fairly well.</p>\n'}, {'answer_id': 2189015, 'author': 'Jim McKeeth', 'author_id': 255, 'author_profile': 'https://Stackoverflow.com/users/255', 'pm_score': 2, 'selected': True, 'text': '<p>They both support <a href="http://openid.net/" rel="nofollow noreferrer">OpenId</a> now.</p>\n\n<ul>\n<li><a href="http://www.mediawiki.org/wiki/Extension:OpenID" rel="nofollow noreferrer">MediaWiki\'s extension</a></li>\n<li><a href="http://wordpress.org/extend/plugins/openid/" rel="nofollow noreferrer">WordPress\'s plugin</a></li>\n</ul>\n\n<p>There are probably other options for using OpenId, but I think that is the best solution available.</p>\n'}]
['https://Stackoverflow.com/questions/37343', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/255/']