unable to get token passed in headers #1447
Answered
by
n1ru4l
Salmandabbakuti
asked this question in
Q&A
-
I'm trying to access the token passed in the headers of the request. Here is how I defined server with context createServer({
...
...
context: (request) => ({ request }),
}) this is how I'm trying to access auth token and getting undefined value although my client has a token attached to the request in the right manner.
is this changed in v2? pls let me know how we can access auth token in yoga v2 |
Beta Was this translation helpful? Give feedback.
Answered by
n1ru4l
Jul 23, 2022
Replies: 1 comment
-
The You access the header using the .get function |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Salmandabbakuti
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
context.request.headers
is an instance of https://developer.mozilla.org/en-US/docs/Web/API/Request/headersYou access the header using the .get function