Replies: 1 comment
-
Hi @konsti EventSource doesn't support setting headers, so there is no way to forward the token to subscriptions that use EventSource. We do fallback to fetch streams in case extra headers are set in the client, eg when you use How do you set the authorization headers with the client? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Following this tutorial (https://docs.wundergraph.com/docs/auth/token-based-auth/auth-js), setting up Wundergraph with NextAuth is easy.
Subscriptions, however, don't work with the middleware. The SSE request is stuck in
pending
. I've debugged everything I can think of, and I am pretty sure the Next.js middleware is the issue, being unable to handle SSE requests properly.Do you have any ideas on how to get Wundergraph and NextAuth working with authenticated subscription support? Has anyone a working example for this use case?
I am very thankful for pointers on how to solve this issue.
Beta Was this translation helpful? Give feedback.
All reactions