next.jsjwthasura

Could not verify JWT: JWSError JWSInvalidSignature


hasura configs

jwt

I have configured hasura config as given in the image and generated token using jwt as shown in the image

but in hasura i am getting this error : "Could not verify JWT: JWSError JWSInvalidSignature"

EDIT : after changing the token now the error solved but now there is no query available: no_query_available


Solution

  • I believe the issue involved mismatch access token secret key resulting in the error

    JWT: JWSError JWSInvalidSignature.

    Ensure you added the Hasura environmental variable on Hasura side:

    JWT_SECRET: { "type": "HS256", "key": "your access token secret key"}
    

    The same "your access token secret key" should be used in your app to encrypt your access token before sending it to the Hasura API.

    Let me know if that works.