Skip to content

feat: support using fetchEventSource for subscriptions #6950

@goleary

Description

@goleary

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✅ accepted-PRs-welcomeFeature proposal is accepted and ready to work on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions