Jeffail / leaps

A pair programming service using operational transforms
MIT License
751 stars 55 forks source link

Binder uses auth tokens as websocket ID #12

Closed Jeffail closed 8 years ago

Jeffail commented 8 years ago

This is an awkward coupling where in reality only a unique integer is needed for tracking connected websockets. This should be swapped out.

jonasfj commented 8 years ago

Even better might be a pointer to the BinderClient. Then b.clients can just be an array... For removing a client we'll have to iterate it, but that's basically the only time..

Also we should probably add userId to BinderClient and not return the token, because the token is used for authentication... So we would effectively be sharing the authentication token with all the other clients in the same document.

Jeffail commented 8 years ago

This is fixed in https://github.com/Jeffail/leaps/pull/13 :)