hoodiehq/hoodie-account-server

Usernames with capital letters fail to authenticate

alterx opened this issue · 4 comments

I've been playing around with the account package and noticed that while creating users with capital letters in their usernames is allowed when the user attempts to log in, this package lowercases the username.

username = username.toLowerCase()

This causes a 404 error (of course, there's no such user) that stops the sign in process. Is there any particular reason for this? If it is, the creation of users with capital letters shouldn't be allowed, If it isn't, we could just remove this line.

gr2m commented

the creation of users with capital letters shouldn't be allowed

💯

That’s a legit bug, can you take a stab at a PR? Let me know if you need any pointers or guidance :)

Sure!
Just to be clear are we going with option a (not allowing the creation of users with capital letters) or b (fixing this line)?

gr2m commented

a – not allowing the creation of users with capital letters

Gotcha :)