I'm just getting started with web development and I'm working on a project where users can sign up and log in. I'm unsure if I should let users include spaces in their passwords or if I should block them. What do you think?
4 Answers
Let users pick their passwords—including spaces, emojis, or symbols! The main thing is how you handle the passwords on the backend. They should be hashed and salted before any saving.
Allowing spaces can actually enhance password strength. Really, you shouldn’t be worried about blank spaces as long as users can reset forgotten passwords. Heck, if someone wants to use a hard-to-type password with spaces, that's their choice! Just ensure you're hashing everything properly.
I think it's perfectly fine to allow spaces. A lot of people like using passphrases, which can be easier to remember. If users occasionally make mistakes with leading or trailing spaces, maybe you could trim those off to prevent issues. But overall, let them choose their passwords freely!
Just enable spaces, and don’t mess with user inputs too much. If people need to reset their passwords later, they can handle that!
Spaces in passwords might complicate things for some users, but as long as they can reset it easily, there’s no need to restrict them. It's all about giving users options without making things unnecessarily complicated!
Totally agree with you! Passphrases are often more secure and easier to recall than complex passwords.