Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live API csrftoken problem #113

Open
limdauto opened this issue Jul 11, 2016 · 1 comment
Open

Live API csrftoken problem #113

limdauto opened this issue Jul 11, 2016 · 1 comment

Comments

@limdauto
Copy link
Contributor

Hello again,

How has everyone solved the missing csrftoken problem with the liveapi feature? I had to hack the liveapi client to set the X-CSRFTOKEN header by reading from the cookie. I wonder if it's the library's responsibility to do that?

@Xazzzi
Copy link

Xazzzi commented Nov 22, 2016

Issue is still open, so it might help someone.
I had similar issue when using both TokenAuthentication and SessionAuthentication backends.
When user is logged in via regular django rest framework login form, django always will check for csrftoken. Trying to get authtoken without csrftoken then results in failure.
Solution is to just log out, then csrftoken is not required, and you can work with api using just authtoken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants