hasura / hasura/graphql-engine
[docs] Fix nav hierarchy and add more examples of `claims_map` configurations
Open
c/docs
k/bug
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
Claims map is a powerful enough feature to deserve its own section on our docs page.
In addition we can add a few more examples, especially using literals for the `x-hasura-roles` bit.
For example, here's possibly the most common claims_map configuration I would use while getting started with an out of the box identity provider:
```
claims_map:
x-hasura-roles: ["user"]
x-hasura-default-role: "user"
x-hasura-user-id: {"path": "$.sub"}
```
This reads as:
- Always use the Hasura role user when an API call is made with this JWT
- Grab the user-id session variable from the `sub` field
Contributor guide
Assessment
This issue has not been assessed yet.