I have a Django project that works perfectly locally, but I can’t use the admin page in the server because the page is reloaded every time I click in the links and the user credentials are re-requested.
I have deployed the project on vercel and connected to supabase pg and it has perfectly deployed. The issue only happens for admin can’t add an item in the database. I’m using django-allauth for my authentication.
here is my settings for allauth
ACCOUNT_LOGOUT_REDIRECT_URL = 'home'
LOGIN_URL = 'account_login'
LOGIN_REDIRECT_URL = 'home'
ACCOUNT_USERNAME_REQUIRED = False
ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = True
ACCOUNT_SIGNUP_PASSWORD_VERIFICATION = True
SOCIALACCOUNT_QUERY_EMAIL = ACCOUNT_EMAIL_REQUIRED
SOCIALACCOUNT_AUTO_SIGNUP = True
SOCIALACCOUNT_EMAIL_REQUIRED = ACCOUNT_EMAIL_REQUIRED
SOCIALACCOUNT_STORE_TOKENS = True
SOCIALACCOUNT_ENABLED = True
SOCIALACCOUNT_ONLY = False
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_LOGIN_BY_CODE_ENABLED = True
ACCOUNT_PASSKEY_LOGIN_ENABLED = True
ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3
ACCOUNT_LOGIN_ATTEMPTS_LIMIT = 5
ACCOUNT_LOGIN_ATTEMPTS_TIMEOUT = 300
ACCOUNT_SESSION_REMEMBER = True
ACCOUNT_SESSION_COOKIE_AGE = 604800
ACCOUNT_EMAIL_SUBJECT_PREFIX = 'Django Ecommerce'
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'http'```
I have included django-allauth as one of my Authentication Backends.
Everything is working for the user i mean the user can create account and login correctly but the issue if for the admin whenever i try to add an item it logs out.
Am using any live caching. How can i solve this?
i ahve tried to clear the cache and also add sessions engine to be the db to no success