Skip to content

Session variables set from HTTP headers #9079

Discussion options

You must be logged in to vote

Hello @christian-detexian

Absolutely , you can use that type of custom headers. But for Hasura to detect, you'll need to have a prefix of x-hasura-* for your header. So for e.g., it could be like X-Hasura-Organization-Id.

An example with a scenario

Let's say I am a user in two different organizations. So in my application, at a time I can only be present in one organization. So you must have seen there's a toggle option or "switch organization" setting which is provided to user if he/she wants to switch organization.

Now upon login, they will select organization and then they will store that organization_id and pass it to hasura auth webhook. Now webhook can return the response such as

(t…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
4 replies
@christian-detexian
Comment options

@meetzaveri
Comment options

@christian-detexian
Comment options

@meetzaveri
Comment options

Answer selected by adas98012
Comment options

You must be logged in to vote
4 replies
@christian-detexian
Comment options

@meetzaveri
Comment options

@christian-detexian
Comment options

@meetzaveri
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants