-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
c/serverRelated to serverRelated to servere/quickfixcan be wrapped up in few hourscan be wrapped up in few hoursp/highcandidate for being included in the upcoming sprintcandidate for being included in the upcoming sprint
Description
Hi!
We are exploring an option of using Auth0 + Hasura JWT authorization and there is a small, but very important piece that is missing.
Auth0 does not allow to have claims directly in the root of idToken object as Hasura docs ask:
{
"sub": "1234567890",
"name": "John Doe",
"admin": true,
"iat": 1516239022,
"x-hasura-allowed-roles": ["editor","user", "mod"],
"x-hasura-default-role": "user",
"x-hasura-user-id": "1234567890",
"x-hasura-org-id": "123",
"x-hasura-custom": "custom-value"
}
Instead, Auth0 suggests creating custom namespace as follows:
{
"sub": "1234567890",
"name": "John Doe",
"admin": true,
"iat": 1516239022,
"https://example.com/claims/hasura": {
"x-hasura-default-role": "user",
"x-hasura-allowed-roles": [
"user"
],
"x-hasura-user-id": "google-oauth2|000111222333444555666"
}
}
Is it possible to add a configuration argument so it will be possible to specify a custom namespace to look for Hasura session variables, like this:
--jwt-claim-namespace "https://example.com/claims/hasura"
Thank you for you help!
Best,
Dmitry
Metadata
Metadata
Assignees
Labels
c/serverRelated to serverRelated to servere/quickfixcan be wrapped up in few hourscan be wrapped up in few hoursp/highcandidate for being included in the upcoming sprintcandidate for being included in the upcoming sprint