-
Notifications
You must be signed in to change notification settings - Fork 675
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
Using jwt as django auth backend? #151
Comments
session authentication using session cookies are normally HTTP only, so your javascript (ie react) cannot acces that one. However once you make django give you a session cookie ( We experienced with In the case of Most backends indeed check for correct username / password and return the user if successfully authenticated, however you need to alter the flow and setup the session (and cookie there) by e.g. calling |
There’s a PR for SPAs at #157 which can help. I’m not for it because I’m still skeptical of security vulnerabilities (typically, if you want JWT tokens for desktop, go with OAuth protocol too instead of only JWT). There are plenty of articles that differentiate when you use only JWT tokens and when to use JWT tokens with OAuth protocol. |
it's related to #130
I'm wondering if I could use single jwt auth backend for DRF and django views
(asked in SO as well https://stackoverflow.com/questions/57646299/django-jwt-authentication-in-django-view-not-just-drf/57646409#57646409)
In our app, we have webview and native android httpclient, and react-native.
If we have to use cookie session-id for django-view and jwt-token for drf, we have to sync cookie and jwt-token among webview/android/react-native.
It will be much easier for us just sync jwt-tokens but not sure if its possible or it is something not advised?
The text was updated successfully, but these errors were encountered: