-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Getting an Error in $: not enough input
error in my JWT auth token
#4525
Comments
@andywong418 what GraphQL Engine version do you use? This issue may be fixed on version 1.2 beta 4 |
@hgiasac I think I'm on Hasura v1.1.1 |
@andywong418 Can you paste the token in https://jwt.io/ and see if it conforms to the spec Hasura expects: https://hasura.io/docs/1.0/graphql/manual/auth/authentication/jwt.html#the-spec |
@tirumaraiselvan My user id is a uuid |
@andywong418 Can you please confirm the Hasura version? I am not able to repro this on v1.1.1 |
@tirumaraiselvan yeah it is on Hasura v1.1.1 |
@andywong418 I tried to repro this with the exact same payload values and Is it possible for you to launch a heroku instance where I can see the problem? |
@tirumaraiselvan could it be the UUID which is causing an issue? |
Do you mean creating a heroku instance with my existing schema? |
Schema can be just minimal, but the |
@tirumaraiselvan I have a database from scratch which is empty so I can just share the token I have now (and change config later). How should I share the details? |
@tirumaraiselvan I have a feeling it's because the types aren't compatible between a uuid and a string in Hasura and so it's telling me there's not enough input since |
@andywong418 Can you just share the token here? |
Thanks @andywong418 The error has nothing to do with the JWT token but it is complaining of the actual data that has been posted. There is basically no operation that is given to the endpoint. Try giving something like this, notice the data after the
|
Problem solved - @tirumaraiselvan I'd suggest in the docs https://hasura.io/docs/1.0/graphql/manual/auth/authentication/jwt.html that it should be explicitly mentioned that access control is necessary for roles like 'user' or 'editor' to work. The docs makes it seem like it's built in to Hasura and so no further setup is necessary. A link on the page to https://hasura.io/docs/1.0/graphql/manual/auth/authorization/roles-variables.html would have been helpful. Thanks! |
I'm getting an
invalid jwt - Error in $: not enough input
error when I try to curl my endpoint. Does anyone know what the issue might be? I'm using a HSA256 scheme.The text was updated successfully, but these errors were encountered: