On Thursday, January 15, 2015 at 11:53:10 AM UTC+1, kevin uittenbosch wrote:
I don't know exactly what you are doing, but it seems it might be with the user authentication cookie. When you login to Ariadne, ariadne sets a login/authentication cookie on the current domain. All following requests use this to see who you are. But this cookie is never submitted to other domains. So domain2 doesn't get the cookie and assumes you are not logged in.
There are a number of ways to fix this. In this case, if domain2 is in the same Ariadne installation, you can just use a 'local' url. The function make_local_url() generates a url for the site in domain2 while keeping the current domain1. You'll get a url like:
While this isn't a nice looking url, it does keep the authentication cookie active.
A better way is to use a single-sign on service or central authentication service. This works like OAuth - like 'login with Google/Facebook/Twitter' stuff. We've made a CAS extension for Ariadne, but it isn't opensource. This will allow you to login to domain1 and be automatically logged in to domain2 as well.