We now pass around user info during editing. E.g. we can add a tooltip that reveals the user name when hovering over a selection.
However now the question is if we want to implement real user accounts for the notepad. It may make the example a bit heavier but I expect that interested users of the library will all ask for exactly that. We can then experiment with simple authentication checkers (e.g. if adding a change record is allowed for a user). However for the moment we want users just to be able to identify who is who in an editing session.
Let's say we implement a signup dialog where a user can enter just their name. When they click sign up they will get a unique login key which will serve as their username+password. They need to keep it somewhere to login again under that same account.
I think that would be better than storing usernames and passwords. Our notepads are private by default, you can not access it if you don't know the url. So we even spare some complicated invite collaborator UI.
We now pass around user info during editing. E.g. we can add a tooltip that reveals the user name when hovering over a selection.
However now the question is if we want to implement real user accounts for the notepad. It may make the example a bit heavier but I expect that interested users of the library will all ask for exactly that. We can then experiment with simple authentication checkers (e.g. if adding a change record is allowed for a user). However for the moment we want users just to be able to identify who is who in an editing session.
Let's say we implement a signup dialog where a user can enter just their name. When they click sign up they will get a unique login key which will serve as their username+password. They need to keep it somewhere to login again under that same account.
I think that would be better than storing usernames and passwords. Our notepads are private by default, you can not access it if you don't know the url. So we even spare some complicated invite collaborator UI.