Open wuuuduu opened 4 years ago
and I think we should introduce new setting which will tell if app should rotate refresh token.
For now, we are not rotating token, because: new_payload['orig_iat'] = orig_iat
<- which won't change life time of refresh token
we could do something like this:
file: rest_framework_jwt.serializers.RefreshAuthTokenSerializer.validate
if api_settings.ROTATE_REFRESH_TOKEN **is False**:
`new_payload['orig_iat'] = orig_iat`
RefreshAuthTokenSerializer has bug in
validate
method. In situation if token is expired, but still could be refreshed it returns an error saying"Token is expired"
, but is should not raise this error.As I see, we are calling
payload = _check_payload(token=token)
which is responsible for raising this error.One of many ways to fix it:
=>
=>
=>