I'm using Django Rest Framework
and also django-rest-auth
.
I've the standard API endpoints (/login, /logout, /registration...)
With my browser, I can login/list my users/logout. With Insomnia (a API requester), I can't login/logout, I've the error
"CSRF Failed: CSRF token missing or incorrect"
Maybe I need to add the CSRF header, but honestly I don't know where to find this CSRF token... Maybe I need to add some things (@csrf_protect
?) to login endpoint, but am I forced to rewrite completely the default view ?