hasura / hasura/graphql-engine
slashes not supported at jwt location key
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Component
### What is the current behaviour?
I need to share the same token from hasura v2 that has this key https://hasura.io/jwt/claims but it wont work and i tryied to find out why.
at auth-config.html im providing the following:
jwt:
claimsConfig:
namespace:
claimsFormat: Json
location: /claims.jwt.hasura.io and it works unless i add another / like /claims.jwt.hasura.io/test
https://hasura.io/jwt/claims doesnt work as well for the same reason i suspect
### What is the expected behaviour?
{
"errors": [
{
"status": 500,
"message": "The GraphQL URL responded with a non-200 status code.",
"details": {
"data": null,
"errors": [
{
"message": "Internal Error - Hasura claims not found in the JWT at /claims.jwt.hasura.io/test"
}
]
}
}
]
}
### How to reproduce the issue?
1. set the namespace location at auth-config.html to contain a slash like this /claims.jwt.hasura.io/test
2. Generate a token with this key and use it in the console
### Any possible solutions/workarounds you're aware of?
Workaround is to change the key in hasura v2 if possible but it may break my existing project
Contributor guide
Research direction
Start with the JWT claims configuration described in auth-config.html, focusing on how the namespace location is interpreted when it contains a slash. Reproduce the issue with /claims.jwt.hasura.io/test and confirm that a token using this key is accepted without the reported claims-not-found error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100