-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught ImmatureSignatureError: The token is not yet valid (iat) #307
Comments
Maybe relevant: jpadilla/pyjwt#814 |
Maybe we could increase the leeway for clock skew? In my case it appears to have been "just" 2 seconds. Not sure whether the we can increase leeway though. https://pyjwt.readthedocs.io/en/latest/usage.html#not-before-time-claim-nbf |
It would certainly be friendlier in these cases to catch |
How catching the error with a warning and trying again with
|
Bumping this as it's happened twice now with LIMC collaborators. On a related slack thread there's a few votes to stop our CLI rejecting iat values from the future. @tsibley would you support a PR changing to |
Yes, I think it'd be fine to set |
Client clock skew can lead to invalid JWTs resulting the the following error during login: ``` nextstrain.cli.aws.cognito.TokenError: ImmatureSignatureError: The token is not yet valid (iat) ```` See <#307> and the (internal) Slack thread <https://bedfordlab.slack.com/archives/C01LCTT7JNN/p1719286802460679> for discussion about whether iat timestamps ahead of the current clock are actually invalid JWTs.
Client clock skew can lead to invalid JWTs resulting the the following error during login: ``` nextstrain.cli.aws.cognito.TokenError: ImmatureSignatureError: The token is not yet valid (iat) ```` See <#307> and the (internal) Slack thread <https://bedfordlab.slack.com/archives/C01LCTT7JNN/p1719286802460679> for discussion about whether iat timestamps ahead of the current clock are actually invalid JWTs.
Current Behavior
When I run
nextstrain login
I get an uncaught errornextstrain.cli.aws.cognito.TokenError: ImmatureSignatureError: The token is not yet valid (iat)
Expected behavior
Error is caught and wrapped into something useful for the enduser
How to reproduce
nextstrain login
Example stack trace:
Your environment: if running Nextstrain locally
auspice 2.7.0
): nextstrain cli 7.2.0Workaround
macOS: run
sudo sntp -sS time.apple.com
to sync my clock and that fixed things. My time was apparently 2 seconds off.Possible solutions
"verify_iat": False
)."verify_iat": False
) (This has been proposed as default behavior in pyjwt)Links
The text was updated successfully, but these errors were encountered: