-
Notifications
You must be signed in to change notification settings - Fork 651
how to refresh existing tokens??? #474
Comments
it is worked!!!! thanks a lot |
How did you do it? |
@SamsadSajid
that's very clear :
so, we should fix it?
this ps: hope useful to you |
I've tested and found out that even though there is 'JWT_REFRESH_EXPIRATION_DELTA' on settins.py, it doesn't work. Only 'JWT_EXPIRATION_DELTA' works for refresh token. |
Like I said above,the JWT_REFRESH_EXPIRATION_DELTA's value means in this time field you can refreash! so base i understand, because i haven't research all django-jwt source code. so i think two situation: when your jwt token expired: but i browse the django-jwt source code ,I don't seem find autocall about refresh. |
Hi Guys, Just a comment and observation on my side about the same issue : for me, as soon as you set JWT_VERIFY_EXPIRATION to true, the decoder of the JWT is checking expiration of the token. As such, even when running token refresh, the same decoding method is called and the program exits at this line of code : If you look at this line of code: You see that expiration is always tested during decoding once set in settings of Django. Even when asking for a refresh ... For me, in case of refresh it should not check expiration time of the token but rather check JWT_REFRESH_EXPIRATION_DELTA. So I wonder if we are not facing a bug here ... but I am not 100% sure. What do you think ? |
i got an error message orig_iat field is required.
the settings is :
REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework_jwt.authentication.JSONWebTokenAuthentication', 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.BasicAuthentication', ), }
The text was updated successfully, but these errors were encountered: