graphql-engine: Getting an `Error in $: not enough input` error in my JWT auth token
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.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (7 by maintainers)
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
-dargument :curl -X POST https://wondrous-hasura.herokuapp.com/v1/graphql -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJctODA1Ni1kZmZiMTc2YTg1NjciLCJuYW1lIjoiQW5kcm9zIFdvbmciLCJpYXQiOjE1ODc2NjE0OTMuMDc3LCJodHRwczovL2hhc3VyYS5pby9qd3QvY2xhaW1zIjp7IngtaGFzdXJhLWFsbG93ZWQtcm9sZXMiOlsibWluZSIsInVzZXIiXSwieC1oYXN1cmEtdXNlci1pZCI6IjJkZjk5ZmRkLWM4ZDctNDk1Ny04MDU2LWRmZmIxNzZhODU2NyIsIngtaGFzdXJhLWRlZmF1bHQtcm9sZSI6InVzZXIiLCJ4LWhhc3VyYS1yb2xlIjoidXNlciJ9fQ.PPY8qk40JIqoZKAmx6Wii2USYzKu1UyLfEIKTWWH_yo' -d'{"query": "query { __typename}"}