Is it possible to revoke refresh tokens? #288
Description
I'm not even sure that this is how refresh tokens are meant to behave, but how can a user effectively notify the system to stop issuing new tokens by using a refresh token in the case their token is compromised?
My settings file contains the following JWT settings
JWT_AUTH = {
'JWT_EXPIRATION_DELTA': datetime.timedelta(seconds=300),
'JWT_REFRESH_EXPIRATION_DELTA': datetime.timedelta(days=7),
'JWT_ALLOW_REFRESH': True,
'JWT_AUTH_HEADER_PREFIX': 'Token'
}
After a user obtains a valid JWT token from rest_framework_jwt.views.obtain_jwt_token they can use it to access my system's APIs, for up to 7 days by getting new tokens each time using rest_framework_jwt.views.refresh_jwt_token. However, what if one of the expired JWT Tokens is compromised before the refresh token's expiration delta (7 days), couldn't it be used to obtain a valid token by calling the same refresh endpoint? If so, how can a refresh token be revoked so this does not happen?
Note: still trying to wrap my head around using JWT tokens securely