How to create headers on the server
Hey, our setup has a gateway in front and that one validated the jwt token I get back from the jwt plugin as passes forward the claims into a custom header. I now also want to provide some admin functionality but at the point where I am getting the request (via GraphQL), the session header is already gone and its unclear to me from the examples how I would f.e. call
listOrganizations
or listUsers
on the server by passing in the user.id
that I get back from the already validated token header.
I could query the DB myself, but that kinda feels off1 Reply
All that BA really needs is cookie values in the headers.
You'll need to find a way to get that cookies safely across - keeping in mind that in production your cookies will have
secure
thus not accessible via JS on front-end to access.