Skip to content
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

Docker hasura garphql Auth0: Error Could not verify JWT: JWSError JWSInvalidSignature #3513

Closed
RKARaj opened this issue Dec 10, 2019 · 5 comments
Assignees

Comments

@RKARaj
Copy link

RKARaj commented Dec 10, 2019

I have followed: https://www.youtube.com/watch?v=kHCLQEKjdnI
For my testing app I am using Docker hasura garphql and For Authorization: Auth0
When I am using https://hasura.io/jwt-config, I am getting JWT Config value with type "type": "RS512".
But the id_token received from Auth0, is of type {"typ": "JWT","alg": "RS256"}

When I tried to use the id_token generated by Auth0 in HasuraConsole(http://localhost:8080/console/) with Authorization header, I am always getting Error: "Could not verify JWT: JWSError JWSInvalidSignature"
{
"errors": [
{
"extensions": {
"path": "$",
"code": "invalid-jwt"
},
"message": "Could not verify JWT: JWSError JWSInvalidSignature"
}
]
}

tried all closed ticket solutions which is NOT Working. Can you please help on this issue.

@RKARaj RKARaj changed the title Could not verify JWT: JWSError JWSInvalidSignature Docker hasura garphql Auth0: Error Could not verify JWT: JWSError JWSInvalidSignature Dec 10, 2019
@marionschleifer marionschleifer added k/question support/needs-action support ticket that requires action by team labels Dec 12, 2019
@praveenweb
Copy link
Member

Hi @RKARaj - Since you are using Hasura with local docker, this should most likely be an issue with environment variable HASURA_GRAPHQL_JWT_SECRET not being set right. If you have a docker-compose setup, you need to make sure to wrap the value in a single quote.

Also you can verify the token generated from Auth0 using https://jwt.io/#debugger-io or even using Hasura Console.

@marionschleifer marionschleifer removed the support/needs-action support ticket that requires action by team label Dec 18, 2019
@RKARaj
Copy link
Author

RKARaj commented Dec 19, 2019

thank you for the response Praveen. I already tried the solution as you mentioned above, which is why I raised it as an issue. In the documentation to do this, something might be missing I believe, I might be wrong. Because certificate 'HASURA_GRAPHQL_JWT_SECRET' is failed to do "Signature Verified". so always ("message": "Could not verify JWT: JWSError JWSInvalidSignature")

@marionschleifer marionschleifer added the support/needs-action support ticket that requires action by team label Dec 21, 2019
@TejasQ
Copy link

TejasQ commented Feb 12, 2020

I'm currently struggling with this too and can't seem to figure out why.

For me, everything works locally, but the same docker-compose file does not work on AWS EC2. Not sure why.

Update: False alarm. Turns out my vim showed me incorrect characters on the config in the EC2 docker-compose file.

@tirumaraiselvan
Copy link
Contributor

@RKARaj Are there any docs you can point to show what type of id_token is generated in auth0 ? Is there a way to configure this, say to RS512 ?

Anyway, have you tried changing the type to type: RS256 in the output of https://hasura.io/jwt-config and then setting the environment variable HASURA_GRAPHQL_JWT_SECRET ?

@marionschleifer marionschleifer removed the support/needs-action support ticket that requires action by team label Mar 2, 2020
@praveenweb
Copy link
Member

Closing this. This is typically a configuration issue for the HASURA_GRAPHQL_JWT_SECRET variable used.

With Auth0 support for jwk_url fixed, this shouldn't be an issue. Tracking docs update for this here #4847

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants