Single sign-on for multiple dokuwiki installations

1.2k views Asked by At

I have a server on which I am using dokuwiki to host both a homepage as well as a wiki. The server is available under www.domain.com and the wiki is available under wiki.domain.com. Internally both subdomains are served from different directories.

However this means, that everybody who wants to sign up has to sign up for the both domains and manage a duplicate set of user accounts for both subdomains.

What I would like is to have a system, where anybody can sign up on both pages and only has to log in in any of the domains and get access. ACL should still be managed separately for both domains, since I might use namespace names multiple times.

I looked through the list oft dokuwiki auth plugins, but I was not able to find anything usefull for this purpose. Another idea would be to just soft- or hardlink the auth data directory in the two installations. However this would still mean users would have to log in multiple times. Also I am not sure whether my hoster actually allows such directory links, or if this might mess up the two installations.

Is there any other way to create such a setup?

3

There are 3 answers

3
Andreas Gohr On BEST ANSWER

A DokuWiki farm setup might help with having the same user database for both sites. Symlinking the user file is another way.

More complicated is to share the cookies between both domains. I'm not sure how to approach this best. Maybe others can offer some ideas.

1
Jeff On

Well since this is on the same server just across your various subdomains I would imagine you would want to store the user info including logins in a shared database so that no matter which app/subdomain you insert their registration data and query for their login info from the same database. Then it's a matter of using PHP sessions for keeping track of if they are logged in across subdomains. There is already a length stack on how to achieve that here:

PHP Sessions across sub domains

0
Dashu On

Try setting the Cookie Domain to .yourdomain.com This means your browser will deliver cookies to subdomains of yourdomain.com.

So cookies will beshared among www.yourdomain.com and wiki.yourdomain.com