jpulgarin/django-tokenapi

Can tokens last for more than the specified TOKEN_TIMEOUT_DAYS

Closed this issue · 3 comments

Is there a way a token can last longer than TOKEN_TIMEOUT_DAYS perhaps forever? After reading the code, I couldn't find a function that didn't perform the date checking.

@aminpour Are you asking because you're seeing a token that hasn't expired, or because you want to implement this functionality?

If it's to implement it, I would suggest using a very large number for TOKEN_TIMEOUT_DAYS, or manually patching tokens.py to remove the date checking.

If it's becaue you're seeing a token that won't expire, let me know and I'll help you debug.

Implement the functionality itself. I was planning to remove the date checking if I were to patch it.

I see. In that case all you need to do is remove the check in check_token in tokens.py. Should be very straightforward.