mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-12-02 13:53:43 +03:00
dont delete auth token on logout
This commit is contained in:
parent
596cbee153
commit
10eb4be9cd
|
@ -129,10 +129,6 @@ class LogoutView(APIView):
|
||||||
return self.logout(request)
|
return self.logout(request)
|
||||||
|
|
||||||
def logout(self, request):
|
def logout(self, request):
|
||||||
try:
|
|
||||||
request.user.auth_token.delete()
|
|
||||||
except (AttributeError, ObjectDoesNotExist):
|
|
||||||
pass
|
|
||||||
if getattr(settings, 'REST_SESSION_LOGIN', True):
|
if getattr(settings, 'REST_SESSION_LOGIN', True):
|
||||||
django_logout(request)
|
django_logout(request)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user