You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I see this in the documentation jwt.encode({"exp": datetime.now(tz=timezone.utc)}, "secret")
I know that importing pytz for example I can specify the timezone and send it as an argument inside the .now parentheses.
The problem here is that when I do that the validation looks like it doesn't work, is there a way to validate that natively with the library or I need to handle that by myself? An example below:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I see this in the documentation
jwt.encode({"exp": datetime.now(tz=timezone.utc)}, "secret")
I know that importing pytz for example I can specify the timezone and send it as an argument inside the .now parentheses.
The problem here is that when I do that the validation looks like it doesn't work, is there a way to validate that natively with the library or I need to handle that by myself? An example below:
If I do the code above expiration validation of the library will still work or I need to handle that by myself?
Thank you in advance for the support
Beta Was this translation helpful? Give feedback.
All reactions