graphql-engine
graphql-engine copied to clipboard
Valid JWT supposedly expired
Version Information
Server Version: CLI Version (for CLI related issue):
Environment
v2.11.1 running in docker on an EC2 instance
What is the current behaviour?
Tonight I switched my database from running within a VPC to managed by RDS, and suddenly when I log into my app my short-lived JWTs are immediately revoked by Hasura, who claims they are expired.
What is the expected behaviour?
The JWTs are definitely not expired, so it should function as normally. I have to bump up my JWT expiry to a long duration (e.g. days) otherwise I hit this error. Strangely this only happens on my deployed version running 2.11.1, but not locally 🤔
How to reproduce the issue?
Screenshots or Screencast
In the address bar of my browser I posted the expiry time of my JWT, you can see on the site my JWT should not be considered expired
Please provide any traces or logs that could help here.
hasura_1 | {"detail":{"http_info":{"content_encoding":null,"http_version":"HTTP/1.1","ip":"38.75.234.136","method":"POST","status":200,"url":"/v1/graphql"},"operation":{"error":{"code":"invalid-jwt","error":"Could not verify JWT: JWTExpired","path":"$"},"raw_query":"{\"operationName\":\"PostTagOptionsQuery\",\"variables\":{},\"query\":\"query PostTagOptionsQuery {\\n e_post_tags {\\n type\\n __typename\\n }\\n}\\n\"}","request_id":"fd575e01-5114-4cc5-a44e-b12f4db87f2f","request_mode":"error","response_size":76},"request_id":"fd575e01-5114-4cc5-a44e-b12f4db87f2f"},"level":"error","timestamp":"2022-09-03T08:51:23.447+0000","type":"http-log"}
Any possible solutions?
I thought maybe setting the allowed_skew
would help since I know it gave me issues in the past when my JWT was issued in the future, but no luck.
Can you identify the location in the source code where the problem exists?
No
If the bug is confirmed, would you be willing to submit a PR?
Honestly don't have the time.
Keywords
JWTExpired