How to dynamically set the access token expiration in Django Rest Framework Simple JWT?

73 views Asked by At

I am working on a restful web application using Django Rest Framework and need to implement a mechanism to check every 15 minutes if the user has been active in order to extend their token expiration. If the user has not been active, their access token should become invalid. I am using Djoser in conjunction with Simple JWT as the authentication backend. Can someone provide guidance on how to achieve this? Thank you.

I have tried creating a custom middleware to track the user's activity for the last 15 minutes but do not know how to effectively manage the user's jwt access token based on the user activity.

0

There are 0 answers