Hi! I'm not a django rest expert, but i think i figured out what's wrong.
The SessionAuthentication class is not used to sign in the user, but to check if a request comes from an authenticated user.
To login using regular session cookie you're supposed to use the standard LoginView class
Thanks for the comment! I figured SessionAuthentication wasn't the correct one, after a few trials.
The only issue I see using directly LoginView is that it entails a server side template. That's why I didn't use it. Check the update in the post about it.
I'm still a little surprised about how complicated is this but it could be 100% because I'm not a Django expert either.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi! I'm not a django rest expert, but i think i figured out what's wrong.
The SessionAuthentication class is not used to sign in the user, but to check if a request comes from an authenticated user.
To login using regular session cookie you're supposed to use the standard LoginView class
Thanks for the comment! I figured
SessionAuthentication
wasn't the correct one, after a few trials.The only issue I see using directly LoginView is that it entails a server side template. That's why I didn't use it. Check the update in the post about it.
I'm still a little surprised about how complicated is this but it could be 100% because I'm not a Django expert either.