-
Notifications
You must be signed in to change notification settings - Fork 69
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
The token is not valid yet #146
Comments
It means the computer clocks are not synchronized. Use ntp. |
Use NTP on the server where this flask application is running? |
You need the clocks properly synchronised everywhere - your Canvas server and your flask application server. The error means that there is a difference in the clocks and hence the application can't trust the token. |
Hello, I'm facing a similar issue but with servers having correct NTP configurations. Regards |
You can set the verify options already, by calling Rather than disabling the iat check altogether, I think what is needed is to add some leeway when calling jwt.decode, at https://github.com/dmitry-viskov/pylti1.3/blob/master/pylti1p3/message_launch.py#L715 Solutions are 1. patch the library, 2. extended MessageLaunch to override |
I agree with the response provided above. I was able to resolve the issue by adding the leeway parameter to the MessageLaunch. This adjustment accommodates the minor time discrepancy between the LMS and application servers without disabling the iat check altogether. |
I think it would be helpful for MessageLaunch to have a method to set the leeway passed to jwt.decode ( |
Thank you for your responses. |
No, it is also applied to the |
pylti1p3.exception.LtiException: Can't decode id_token: The token is not yet valid (iat)
I'm getting this error. Everytime I try to launch an app from canvas, this is the error I'm getting. It was working for a day or so, I changed some code in launch that deals with nrps to get the role of the user, I'm getting this error.
The text was updated successfully, but these errors were encountered: