1👍
You’re asking for Single Sign On (SSO). It’s a rather rich and complex topic. There are some available django solutions like django-sso.
Here’s another stack overflow question on SSO with django:
Implementing Single Sign On (SSO) using Django
0👍
If these domains are subdomains of the same 2nd level domain then you can use the SESSION_COOKIE_DOMAIN
setting:
SESSION_COOKIE_DOMAIN = '*.somedomain.com'
If domains are totally different then you in trouble. You can’t set cookie for the external domain.
I think you have to create a special view on the second domain which will receive the session_key
in the GET
parameter and set the cookie for the second domain.
To prevent attacks you can store in the session some info about the user (at least the IP
and User-Agent
) at the first domain and compare this data against the visitor of the the second site.
- [Answer]-Django return successful/failure after processing POST data
- [Answer]-Django How to iterate over list returned from ldap to save new object
- [Answer]-How to set 'next' parameter via extra_context in Django
- [Answer]-How to handle CommandError exceptions in Django tests
- [Answer]-Django 1.7 – update a user record using a form