Make sure to filtered already-expired tokens from the "expiring soon" tokens
This commit is contained in:
parent
8c14a8fdf2
commit
e1a3857de9
1 changed files with 2 additions and 1 deletions
|
@ -60,7 +60,8 @@ def get_expiring_tokens(user, soon):
|
|||
return (AppSpecificAuthToken
|
||||
.select()
|
||||
.where(AppSpecificAuthToken.user == user,
|
||||
AppSpecificAuthToken.expiration <= soon_datetime))
|
||||
AppSpecificAuthToken.expiration <= soon_datetime,
|
||||
AppSpecificAuthToken.expiration > datetime.now()))
|
||||
|
||||
|
||||
def gc_expired_tokens(user):
|
||||
|
|
Reference in a new issue