4

I'm using the django-rest-authtoken library (https://github.com/wichmannpas/django-rest-authtoken) to manage my API users. The biggest inconvenience is that the user authentication tokens expire in 24 hours, effectively requiring to perform login every day. Unfortunately I couldn't find a way to change the token expiration time. Any help appreciated.

1 Answers1

3

Looks like 1 day is default value in settings:

https://github.com/wichmannpas/django-rest-authtoken/blob/master/rest_authtoken/settings.py#L10

so setting AUTH_TOKEN_VALIDITY in your project should do the job.

Linum
  • 311
  • 1
  • 8