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.
Asked
Active
Viewed 8,520 times
1 Answers
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
-
Thanks, should have looked in the settings file, which I admittedly hadn't done. I'm sure it will work, but will report back anyways. – Sandro Tarkhan-Mouravi Feb 06 '22 at 13:26