Skip to content

Conversation

shincurry
Copy link

Authentication credentials (taking JWT as an example) can be placed in params.

If it is an accessToken, when the accessToken expires, we need to get a new accessToken by refresh Token, and use this new accessToken to reconnect to the Websocket server.

y-websocket use polling interval to try to reconnect when connection failed, so, allow to directly modify the config containing the token inside the WebsocketProvider instance, then the new token can be used to reconnect to server without re-creating the WebsocketProvider instance.

code changes:

  • Save serverUrl as a public property
  • Save params as a public property
  • Make url property as a readonly computed property
  • Make bcChannel property as a readonly computed property

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