Which characters can be used for a username? I am asking, because I want to create a separate user for “root”, since those commands probably make no sense to show up under my standard user. But I don’t want to name that user “root” in atuin.
Are characters like . - _ / allowed?
Also, is it allowed to create a user with an email address that has already been used for another user?
I was running a few tests, thus answering my own questions. But new questions came up as well.
Supported characters in users
Error: Invalid request to the service: 400 Bad Request - Only alphanumeric and hyphens (-) are allowed in usernames.
Only alphanumeric and hyphens (-) are allowed in usernames.
Is there a reason why ./_ are not allowed? I don’t see any issues with those 3 characters.
Would a PR be accepted to allow additional characters? I haven’t checked the code yet, but obviously this only makes sense, if there aren’t any side effects and a huge refactor isn’t required.
Users with the same email address
Error: Invalid request to the service: 400 Bad Request - failed to add user.
Apparently not possible. The error message could be more useful though, unless it is on purpose not to reveal that an email address has already been used. In this case, the error message is fine.
On the other side, it is perfectly normal to have 2 users with the same email address. This would even work for a reset password flow, if one enters the username (instead of only the email address) or both to reset a password.
The problem is that currently the client does not know which email the user used for registration. This means, if the user forgot which email address they used, they’d be in big trouble in case thet wanted to reset their password.
All I am trying to say it that it does’t make any sense to disallow duplicate email addresses in the current architecture. Unless I am missing something.