slate-collaborative icon indicating copy to clipboard operation
slate-collaborative copied to clipboard

Ability to get names on backend

Open zekenie opened this issue 5 years ago • 2 comments

Hi there!

I'm really enjoying playing around with this project. I think it'd be great if there were a way to resolve the cursor name on the backend instead of the frontend. In my case, I want to send a jwt to the backend over a websocket and then use that to resolve a name, instead of trusting the client.

zekenie avatar Jun 17 '20 00:06 zekenie

Hi @zekenie!

This is the interesting point! I think we need to change the onAuthRequest function to return an object with user data for this.

cudr avatar Jun 18 '20 08:06 cudr

I was actually able to solve this in a hacky way by throwing if data didn't match in the onAuthRequest

zekenie avatar Jun 18 '20 16:06 zekenie