hasura / hasura/graphql-engine
Auth: Add support for selecting the db tenant via a JWT claim
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
We use schema per tenant approach in PostgreSql. Currently we have to use apollo client to modify the query by adding the correct tenant to the front of the query and then map the tenant claim in the JWT to a user which has access to the proper tables/views/actions for that tenant.
### Describe the solution you'd like
It would be awesome if we could map the tenant claim in the token directly to a DB schema so that we didn't have to use Apollo client to rewrite the query dynamically or map to a tenant specific user.
### If the feature is approved, would you be willing to submit a PR?
Yes, we would be willing to do the dev work if this feature is approved.
Contributor guide
Assessment
This issue has not been assessed yet.