I am using a very custom login process, with email/password forms there's no problem. I am using redis to store the session. I know that I can configure SESSION_ENGINE
in my settings.py
file and Django will do this even with python-social-auth
login, but I need to write my own session key and value, because I am using jwt
, I also need to do some other custom action in login process, so I have been looking for a while how to 'intercept' the login process in the python-social-auth flow, I have checked the code for every pipeline but I couldn't find out where is this happening. How can I implement a custom login with python-social-auth
?
You can try great django-rest-social-auth
( https://github.com/st4lk/django-rest-social-auth ) which uses python-social-auth
, django-rest-framework
and also djangorestframework-jwt
modules (the last one implements JWT support). If it's not suits you, you can discover the code of django-rest-social-auth
and djangorestframework-jwt
to implement your own flow.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.