I am implementing login functionality using session authnetication. The login view correctly returns a set-cookie for csrf and sessionid. All changes within the settings.py file for the cookie are present. In postman the cookie gets set correctly, however in the browser on localhost, it does not. I've toyed around with several settings including:
CORS_EXPOSE_HEADERS, SESSION_COOKIE_SAMESITE, SESSION_COOKIE_DOMAIN, SESSION_COOKIE_MAXAGE, SESSION_COOKIE_SECURE, SESSION_COOKIE_HTTPONLY, CORS_ORIGIN_WHITELIST, CORS_ALLOWED_ORIGINS, CORS_ALLOWED_HEADERS, CORS_ALLOW_CREDENTIALS. The same issue is with the csrf token too, but for now I was only toying around with the sessionid. Localhost is running on https.
#Issue with settings cookies in browser, works normally on postman
1 messages · Page 1 of 1 (latest)
Spend some time writing a reproducible piece of code that showcases your problem. Having the same problem for 2 weeks is a bit long. You should try to minimize your scope and narrow down the issue to its root cause. Quality of your question increases your chances of getting a decent response.