RTIInternational / NHLBI-BDC-DMC-DST

My personal repository for work on the BioData Catalyst Dashboard
Apache License 2.0
4 stars 3 forks source link

CSRF error trying to login #63

Closed amc-corey-cox closed 1 month ago

amc-corey-cox commented 6 months ago

On trying to login to the development environment made available on my system an external collaborator has received a CSRF error. I'm not sure what is going on here but we will need to solve this if it means people can only log in from the originating system more information will follow.

amc-corey-cox commented 6 months ago

Here is the error and some documentation.

image

Here’s the Django link in the screenshot:

https://docs.djangoproject.com/en/4.1/ref/csrf/

amc-corey-cox commented 6 months ago

Info in case helpful:

I’m using Chrome. No ad blockers. Cookies accepted. Tried the IP address on and off the RTI VPN. In the error details, this one caught my eye: “If you are not using CsrfViewMiddleware, then you must use csrf_protect on any views that use the csrf_token template tag, as well as those that accept the POST data.”

Looking for errors at the home page: image

amc-corey-cox commented 1 month ago

After deployment, I was able to add the AWS instance as a trusted origin in settings.py. Also, I needed to have secure HTTP enabled.