I recently started playing with Django.
When I try to log in into the admin panel, it succeeds in Firefox but doesn't in Google Chrome.
This is the error i get : Forbidden (CSRF cookie not set.): /admin/login/
My cookies are enabled in Chrome for every website. Is there a specific reason why it would work in Firefox but not in Chrome?
Thanks!
I had similar problem and the solution for me was to set Django setting
SESSION_COOKIE_SECURE = False
I know this is the default setting but I've been using production config with this set to True. So in my dev settings I changed it to False and was able to log in to admin panel in Chrome.
On Feb 2020 Chrome implemented a change that enforces that Secure cookies are only accessible via HTTPS protocol. So if you're developing locally and only using HTTP that is a killer. Firefox and Edge are yet to enforce Secure flag |(based on taday's versions)
Are you not developing using the c9 platform?
I reset my chrome setting and it worked fine. In Chrome, click on the 3 dots on the far right and goto settings. On settings page, scroll all the way down or click on the bottom left "Reset Settings" button and reset settings.