Hi, If you use db backend for sessions you could save the session in both databases. Check this: http://dustinfarris.com/2012/2/sharing-django-users-and-sessions-across-projects/ I hope this helps.
Best regards, Marcin On 14:22 Tue 11 Jun , Tomas Ehrlich wrote: > Hi Avraham, > I know that cookies can be shared among subdomains, but my customer wants to > have separate domains. > > The iframe solution is already implemented. It simply opens > http://<domain>/sess/<session_id> url for each domain in hidden iframes. > The view only saves session_id to cookie "sessionid" (by default). > https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-name > > It could be probably handled at nginx/apache level, but I don't have > sources or server access to that site. > > The drawback is that lots of requests are called on every page refresh -> > that's why we are looking for another solution. Fallback to subdomains > is the only solution which is on the table right now. > > > Cheers, > Tom > > Dne Tue, 11 Jun 2013 12:40:12 +0300 > Avraham Serour <[email protected]> napsal(a): > > > interesting problem! > > I googled for "Sharing session among multiple domains" > > > > take a look here for example: > > http://stackoverflow.com/questions/6080017/how-to-share-session-among-multiple-domains-on-single-asp-net-website > > > > it looks like you can do it across subdomains, so one solution is to split > > your websites on subdomains > > one interesting suggestion is the iframe one, if you implement that please > > share how > > > > > > On Tue, Jun 11, 2013 at 10:04 AM, Tomas Ehrlich > > <[email protected]>wrote: > > > > > Hi there, > > > this question isn't bound to Django Web Framework as the major > > > limitation are cookies: > > > > > > I have single instance Django site running on multiple domains. Each > > > domain simply filters specific categories. There's an eshop and I need > > > to share sessions among all domains so user can log in on one site and > > > stay logged while browsing other domains. > > > > > > As I said before, the major limitation is how cookies work -- they're > > > bound to single domain or many subdomains. > > > > > > > > > I saw one solution -- on every page request send many GET requests to all > > > domains, giving them session_id, eg: > > > > > > http://domain/sess/<session_id> > > > > > > Each domain then receives session_id and save it to cookie. When user > > > browse through site and switches to other domains, he remains logged in > > > as the session_id is the same. > > > > > > This works but I'm concerned with security issues. Also I don't like > > > 30+ requests on every refresh (it could be probably limitet only to > > > login/logout views). > > > > > > > > > What's you opinion? Have you ever dealt with problem like this? How > > > have you solved it? > > > > > > > > > > > > S pozdravem > > > Tomáš Ehrlich > > > > > > Email: [email protected] > > > Tel: +420 608 219 889 > > > Jabber: [email protected] > > > > > > "Půjdu kamkoliv, pokud je to kupředu." - D. Livingstone > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Django users" group. > > > To unsubscribe from this group and stop receiving emails from it, send an > > > email to [email protected]. > > > To post to this group, send email to [email protected]. > > > Visit this group at http://groups.google.com/group/django-users?hl=en. > > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > > > > > > > > S pozdravem > Tomáš Ehrlich > > Email: [email protected] > Tel: +420 608 219 889 > Jabber: [email protected] > > "Půjdu kamkoliv, pokud je to kupředu." - J. London > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.

