I have two django application which are on same server on port 80
and 9002
. i.e. urls are www.abc.com
and www.abc.com:9002
Both share same database postgresql for authentication. I want to share the share the session data between them so that user logged in to one application can log in automatically in another application.
I read these answers : Multiple Django apps, shared authentication and How to get distinct Django apps on same subdomain to share session cookie?
And did this in my both django application:
- Used the same secret key in both.
Added these lines:
SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies' SESSION_COOKIE_NAME = 'abc'
SESSION_COOKIE_DOMAIN = '.abc.com'
But still I am unable to achieve the purpose. How to share the session cookie between two django apps so that i can have shared authentication?