I want to have multiple django projects but using just one user database to login and have that instance (request.user)? I am using PostgreSQL.
I mean when I access to one app of Django still has the same cookie for login or user another app.
I want to have multiple django projects but using just one user database to login and have that instance (request.user)? I am using PostgreSQL.
I mean when I access to one app of Django still has the same cookie for login or user another app.
Possible and here are your two options
You need to share DB between your apps and configure Cookie
a. To share db for USERS model https://docs.djangoproject.com/en/dev/topics/db/multi-db/
b. Update settings
https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-SESSION_COOKIE_DOMAIN will give you access to cross-domain cookies
SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
SESSION_COOKIE_NAME = 'your_cookie_name'
SESSION_COOKIE_DOMAIN = '.yoursite.com'
SECRET_KEY = "Share same key(this key) between your apps"
SECRET_KEY should be same in both app's settings.py
Try to implement Django openid, something like FB oauth login / Google oauth login
Here is Django OIDC: http://django-oidc-provider.readthedocs.io/en/v0.5.x/