Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Dynamic Protocols #163

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

maxfortun
Copy link

Issue [#162].

Feature:
Dynamically provide Protocols on reconnect.

Use case:
Protocols is the only mechanism available to WebSocket to pass initialization information to the backend at connection time. As such, this could be leveraged for authorization. Modern authorization mechanisms, such as tokens, rotate over time and reconnecting with an old token will eventually fail. A dynamic Protocols provider can produce valid tokens at reconnect time.

threepointone added a commit to partykit/partykit that referenced this pull request Jan 8, 2023
This forks `reconnecting-websocket` into our own package, and adds some functionality from abandoned PRs on the source repo. Of note:
- pladaria/reconnecting-websocket#166 Fix: handle error if getNextUrl throws
- pladaria/reconnecting-websocket#132 feat: make protocols updatable
- pladaria/reconnecting-websocket#141 [Fix] Socket doesn't connect again after closing while connecting

(TODO: more)
- pladaria/reconnecting-websocket#163 Support for Dynamic Protocols
- pladaria/reconnecting-websocket#47 reconnecting and reconnectscheduled custom events
threepointone added a commit to partykit/partykit that referenced this pull request Jan 8, 2023
This forks `reconnecting-websocket` into our own package, and adds some functionality from abandoned PRs on the source repo. Of note:
- pladaria/reconnecting-websocket#166 Fix: handle error if getNextUrl throws
- pladaria/reconnecting-websocket#132 feat: make protocols updatable
- pladaria/reconnecting-websocket#141 [Fix] Socket doesn't connect again after closing while connecting

(TODO: more)
- pladaria/reconnecting-websocket#163 Support for Dynamic Protocols
- pladaria/reconnecting-websocket#47 reconnecting and reconnectscheduled custom events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant