feat: support using fetchEventSource for subscriptions
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- api
Research direction
Start by locating tRPC's subscription entry point and its current EventSource usage. Compare that flow with fetchEventSource, focusing on support for request headers and cross-origin cookies. Done means subscriptions can use those authentication mechanisms without exposing tokens in query parameters or requiring a separate subscription token process.
Written by the indexing model from the issue text.
Description
Describe the feature you'd like to request
EventSource is lacking a ton of functionality that makes auth a giant PITA
- headers are not supported
- cross origin cookies are not supported.
Describe the solution you'd like to see
fetchEventSource fixes these shortcomings of EventSource.
Would be awesome to be able to utilize this out of the box in tRPC.
Describe alternate solutions
We use tRPC with header auth, but now to use subscriptions we have to either expose our tokens via a get param or implement a subscription specific token process.
Additional information
No response
👨👧👦 Contributing
- 🙋♂️ Yes, I'd be down to file a PR implementing this feature!
- Dominant language
- TypeScript
- Stars
- 40.6k
- Forks
- 1.7k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 22
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from trpc/trpc
-
🐛 bug: unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
🐛 bug: unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
👋 free for all 📚 documentation / examples
Difficulty 2/5 1-2 days Newbie friendliness 74/100
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·