diana.holland
06/22/2023, 7:35 PM5.0
in our development environment. Wondering if you have any ideas.
Our hosted core
instance was upgraded to 5.0
this morning. That seemed successful, so we deployed the changes to our backend SDK (package version + config changes) and client (JWT fetching) from the change logs. Now all our users are getting a Could not verify JWT: JWTExpired
error from Hasura when it attempts to validate the token. This is for people who had an ongoing SuperTokens session.
Versions:
- supertokens-core
: 4.6
to 5.0
- supertokens-node
: ^13.5.0
to 14.x
- still on supertokens-web-js
^0.5.0
diana.holland
06/22/2023, 7:37 PMdiana.holland
06/22/2023, 9:40 PMsAccessToken
or st-access-token
, they both appear to be in the newer token format... but with an added jwt
field. The exp
value on the cookie is not expired. But decoding the nested jwt
value, that one is expired.
Should the nested jwt
be there? It seems to break the seamles upgrade path behavior for users with older valid tokens. Since it checks for a jwt
and finds it. If the nested jwt
weren't there I think it would use the new getAccessToken
method instead.rp_st
06/23/2023, 5:57 AMrp_st
06/23/2023, 5:59 AMjwt
key and if it does, use that to send to hasura (since those are still older sessions). If it does not, then use session.getAccessToken on the frontend to get the jwt from the newer session.
Once the older sessions refresh, their tokens will be upgraded to not have the nested JWT.rp_st
06/23/2023, 5:59 AMdiana.holland
06/23/2023, 6:02 AMsAccesstoken
and st-access-token
is the newer version that's not supposed to have a jwt, but it also has a nested jwt within it.diana.holland
06/23/2023, 6:03 AMdiana.holland
06/23/2023, 6:13 AMrp_st
06/23/2023, 6:33 AMjwt
field in it, and if it does, use session.mergeIntoAccessTokenPayload({jwt: null})
diana.holland
06/23/2023, 6:38 AMdiana.holland
06/23/2023, 6:40 AMrp_st
06/23/2023, 6:44 AMdiana.holland
06/23/2023, 7:26 AMrp_st
06/23/2023, 8:26 AMrp_st
06/23/2023, 8:26 AM