Closed duggalmayank closed 1 year ago
jwt_token = jwt.encode(payload={"exp": datetime.datetime.utcnow()}, key="secret")
jwt.decode(jwt=jwt_token, key="secret", leewayTIme=120, algorithms=['HS256'])
the last statement raises ExpiredSignatureError, but if I use datetime.datetime.now() insetead of utcnow(), it works and returns the decoded token.
The documentation mentions that expiration time is compared against UTC timestamp.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
jwt_token = jwt.encode(payload={"exp": datetime.datetime.utcnow()}, key="secret")
jwt.decode(jwt=jwt_token, key="secret", leewayTIme=120, algorithms=['HS256'])
the last statement raises ExpiredSignatureError, but if I use datetime.datetime.now() insetead of utcnow(), it works and returns the decoded token.
The documentation mentions that expiration time is compared against UTC timestamp.