hasura / hasura/graphql-engine
provide JWT token in transactions
Open
c/server
support/needs-triage
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
In my Postgres DB, I have some tables where I have specified some default inserts based on passed in JWT token claims. This was from using a different solution..but utlimately, in Postgres, I could specify the variable using this format for example. I could place this in the default value, such that upon insert, it would use the logged in users "userid" value.
(current_setting('request.jwt.claims.userid'::text, true))::integer
Does Hasura pass the JWT claims to Postgres like this? I tried the above, but nothing was recognized so I'm wondering if you don't pass them or if you use a different format.
Contributor guide
Assessment
This issue has not been assessed yet.