codepod-io / codepod

Codepod IDE: Scalable Interactive Coding
https://codepod.io
MIT License
75 stars 15 forks source link

feat: add authentication to yjs server #428

Closed lihebi closed 1 year ago

lihebi commented 1 year ago
  1. Front-end sends the user token with the Yjs WebSocket request.
  2. Yjs-server validates that the user has read or write access before connecting the WebSocket. This PR also handles read/write access differently at Yjs level.