The Problem with Passwords

by Lyle Mullican

46 Reader Comments

Back to the Article
  1. What’s the connection between people having to remember passwords, password resets, and cleartext passwords?  Surely there’s a considerable difference between typing in a password while someone is ogling your screen and having someone hack into your email account, reset your password, receive the new password in your email account, and impersonate you? I don’t buy it.  I hate seeing my passwords in cleartext, it means I have to look around for suspicious people before logging in/signing up for a website. Also, anyone who knows what highschool I went to can reset my password?  Yes, but that reset password is sent to your email address, and if they have that you’ve already lost.  Also, pick a better security question.  “What high school did I go to” is known by many, but “What was the date of birth of the first girl I slept with” or “What odd medical condition does my father have” are a little more secure and still easy to remember. A little unrelated, but a pet peeve of mine is when I get an email that says “your password is yaddayadda” and I just think “so you’re not encrypting my password?” but yeah, anyways that’s unrelated. Back on topic, passwords are “a significant cognitive burden”?  So what?  What about remembering my NI number, my passport number, my ZA ID number, my driving license number, my street address, my telephone number and my cellphone number?  Just deal.  I think web designers/developers should do their part and make the site as secure as possible, everything else is the users responsibility. Andrew
    Copy & paste the code below to embed this comment.
  2. These debates often make me laugh.  They often demonstrate a clear lack of understanding on the part of the author. Ok, this article is meant to tackle the UX part of authentication, the fact we should be using more complex passphrases that are prone to mistyping, and how to reduce the apparent barrier to entry of a site (without compromising security). The presented technique has a simple but significant flaw in that it does reduce the security of the site.  Text Input fields can be copy/pasted from, Password fields can only be pasted to (not copied).  If you use a technique that replaces the password field with a text input, it opens the possibility of a browser addon stealing the password.  Ok, you might accept that a keylogger has the same capability. Banking systems often get around the problem of mistyping by reducing the number of letters extracted from the password that are required for input (i.e. enter the first, six and last letters), which are randomised on each input and still concealed from view.  However, this means that the server requires to store the password in the plain (or at least with some common decryption key), and means if the server is compromised all passwords are revealed.  I never recommend the storage of the original password on a server - a hash should be stored which cannot be simply reverse engineered, but can be compared in its entirity to a hash generated on user input (so the hash itself would not succeed if used as user input).  If the server is compromised, the hash is of limited value. A bigger question in my mind lies in the definition of the user ID (email, nickname etc), and the definition of a strong password.  I see so many sites these days implementing password strength tests whilst still majorly compromising the users choice of password content.  e.g. they might insist on a mixture of letters and digits, but prevent spaces or overall password length, which means I can’t use an easy to remember phrase e.g. ‘a list apart is the 1st site i visit each day’ might be a very useful password which I can vary on each site I visit and still meets the requirements of a strong password.  Instead the geeks out there seem to suggest I should use arcane passwords such as ‘B%^Dg6@’ unique to every site - how on earth are we supposed to remember those without writing them down or at least using a password manager. The ID element is also more complex than meets the eye.  My email address is unique to me (although many people share an email address amongst family members), but in the event that I loose access to my email address (a common occurrence) I cannot use most password reset/reminder systems as they require access to the recorded account address.  A nickname may not be unique to me - how often has your preferred nickname already been taken by your favourite website - how often have you lost access because you can’t remember which nickname you used? I’d love to see an ALA article written by a respected security expert that provides some clear guidance to UX designers and site developers on what is considered best practice, rather than piecemeal articles that only serve to weaken the security of websites when presented without the caveats.
    Copy & paste the code below to embed this comment.
  3. Having just posted above, and needing to signup in to ALA for what is my first post, I can’t believe there is no apparent way for me to modify my own registration details!  No link anywhere!  No confirmation email from ALA on my new registration, with details of how to unsubscribe. What gives!
    Copy & paste the code below to embed this comment.
  4. It’s my opinion that some things are better left to browsers. Ever filled out a form that was poorly done in flash? It’s obnoxious because it doesn’t behave like every other form element the browser renders. I don’t mind changing some aesthetics of the form to match a site, but this feels like one of those items that is better left to the browser (like what if we could markup a scroll bar on the left of the screen). HTML provides us with a password input to use and leaves it up to the browser to accomplish its function, “The user agent should obscure the value so that people other than the user cannot see it.” (W3C HTML5)
    Copy & paste the code below to embed this comment.
  5. how would this affect the browser’s ability to remember the password? I don’t believe that we should mess around with standard controls. A centralized authentication service might one day be sufficient to remove password identification requirements on third party sites completely - maybe google can do this…but the tradeoff would be that every site that you visit, after you’ve signed in, would know you, and your information…
    Copy & paste the code below to embed this comment.
  6. I like this article, and love that in a Mac you can see wireless connections’ passwords whereas in Windows you can’t. Letting the user choose seems like the best of both worlds. In the programming aspect of it, I don’t really know much about it, but would JQuery also do the trick maybe with less code?
    Excellent article.
    Copy & paste the code below to embed this comment.
  7. This area of usability is really difficult to judge. I think in most cases it would make the user feel more vulnerable - I know that it would make myself and many of my friends, colleagues and family feel that way. @rosaiani: There is an option on Windows Vista that allows you to see the password.
    Copy & paste the code below to embed this comment.
  8. I liked the article myself, even if I probably won’t end up implementing it. If I were to choose one of the two methods mentioned (Using plain-text passwords doesn’t count as a real option) I would probably choose the first, the ability to toggle between the two. Your implementation was rather nice on that one. The second technique, however, posed some problems for me. First, it might be my browser alone, or a result of the attached events, but the cursor showing my typing position didn’t work correctly (as in, I couldn’t ever see it :P). Also, with the way that implementation was written, it’s impossible to delete and replace the first (or middle) letter of the password. Deleting the first bullet in the text field will remove the last letter from the password field. And while I would assume that users do not often do this, it would still break were they to try. In addition to the two methods listed, the only other suggestion that I can give to help users input their passwords correctly is to warn them that caps lock is on. Sadly we can’t do this until the user actually presses a button. We can’t find the status of capslock specifically, but we can mostly determine one way or the other. though I don’t have time currently to write up an example in Javascript, I can give you some (very)pseudo code: On keypress (in the password field):
    A. Check to see if the letter presses is a capitol letter.
    B. Check to see if the shift key was held for this event.
    Now, if it was a capitol without Shift, then caps lock is probably on.
    Also, if it was NOT capitol but shift WAS held, caps lock is probably on.
    If caps lock is probably on, display a warning. If not, clear the warning (if it exists).
    Well, I guess that’s all for now. I can write up an example function and post it here later if there’s any interest. But overall, thanks for the great article Lyle.
    Copy & paste the code below to embed this comment.
  9. Despite the obvious issues and concerns raised already in these discussions, it’s clear that there will be support for these techniques - at least in some arenas. Apple’s implementation on the iPhone is clear evidence of this. I, for one, am avidly in favour of improvements that make it easier for the user to enter their details correctly.
    For UX designers set on implementing these techniques, the emphasis should lie on minimising the differences between expectation and delivery. Users will expect their ‘improved’ password field to still respond to human interface (typing, backspacing, pasting, selecting, etc.) in the same way the old fields did, but if they don’t it could lead to serious issues of distrust.
    In testing the Progressive Masking technique (Firefox, Chrome, Safari) it becomes evident that the overlay field plays havoc on the user’s ability to select characters in the same way the password field allows. Consider a user who enters their password incorrectly, is notified by the overlay, and uses Shift + ← to highlight and delete the incorrect character. The user gets no indication of the password being highlighted, and thus becomes suspicious of the integrity of the password field, and the environment in which it resides.
    Similarly, when the user attempts to highlight with the text selector cursor, the user either gets no feedback as to what is being selected (Chrome, Safari), or the masked layer is selected but cannot be manipulated (Firefox).
    For this technique to be effective in the wild, the implementation must have the same functionality as the original, but with the added benefit of self-validation. I believe that somehow implementing synchronised feedback between both the mask layer and the input layer (when highlighting) is essential in ensuring a usable improvement to the password field.
    Copy & paste the code below to embed this comment.
  10. I know there was some controversy when Nielson first mentioned this. Then, as now, the only real argument I’ve heard that makes any sense in a user experience setting is the added confusion by discarding a known consistency. Otherwise, I’ve heard no argument that justifies the extra development time or potential for conflict that the “solutions” offered here (and elsewhere). There is either an issue masking the text or there isn’t. If there is, then half-masking or toggle-masking isn’t a solution—it adds another layer of complexity to the interface. The only real solution is clear text (which I personally agree with). Or, maybe the issue is pretty non-existant, and we’re worrying over nothing. In both cases, these half-measures only muddy the situation. Instead of one known interface that does or doesn’t work, we have 3 (or more) interfaces, none of which really fix the core issue.
    Copy & paste the code below to embed this comment.
  11. Better yet, get rid of passwords altogether. The response from users of my password-less service “wasitup.com”:http://wasitup.com has been great.
    Copy & paste the code below to embed this comment.
  12. I noticed the suggested solution, whereby the user has a checkbox which would allow them to switch between a plain-text and password type field for their password was, well, to be brutal, pointlessly more complex than it needed to be. Rather than creating a new, cloned, text field to be able to switch to and from instead of the password field, why not just have the javascript action, performed on a user click, change the “type” attribute to “password” if it was “text” or to “text” if it were “password”? Creating a second field, really, seems to provide no added functionality from what I can see. I am happy to be proven wrong, though.
    Copy & paste the code below to embed this comment.
  13. Thanks for the feedback, everyone. @Andaith: The point is that having any automated password reset mechanism undermines the security of the entire system. An attacker is able to modify the password without having knowledge of it. The relationship of Web application authentication to email accounts is a separate discussion, though an interesting one. @dmeehan: The contents of a password field can be easily read by JavaScript (otherwise the techniques demonstrated wouldn’t work). Masking protects the password from eyeballs and nothing else. Except to the extent that the password can be seen by an observer, these techniques do not introduce any vulnerability that doesn’t already exist. @AdriaanNel: Both techniques should work as expected with pre-filled password fields. This is important not just for browser-level features, but in the case of validation where a user is redirected back to a form to supply additional information. @rosaiani: Yes, a framework could make this easier, and the article mentions that. But JQuery is just one option (everybody has their favorite), so I wanted to demonstrate the concept without marrying it to a particular framework. @Chibu and @juanojeda: The point about editing an arbitrary character in the progressive masking technique is a good one. The function could probably be made more sophisticated to handle this situation. However, this does seem to be a pretty unlikely behavior.
    Copy & paste the code below to embed this comment.
  14. @uggedal: Nice site. I like the interface, and the passwordless system seems like it would work well there. However, this is definitely not always the case. For instance, I work for a robotics company and our service tracking system (which I develop) is a web application accessible (by necessity) to the internet. This system contains sensitive company data. Therefore, it is really not possible to not use passwords. Even though this security measure is by far not foolproof (a lost laptop with a saved password for instance), it is a necessary step to attempt to preserve the integrity of the system. Though, don’t get me wrong, as noted, I think in your case you are absolutely correct, passwords for the service you’ve linked would be more than necessary. Worst case scenario, you get receive an incorrect email, or do not receive an email at all. So, I would therefore say that the level of security—passwords, ease of reset, etc—should be based on the sensitivity of information contained. Thanks for the link. I’ll have to keep that in mind next time I’m working on a project with non-sensitive information.
    Copy & paste the code below to embed this comment.
  15. @Lucanos: The technique you described doesn’t work in Internet Explorer. IE doesn’t let JavaScript set the type attribute of an input element.
    Copy & paste the code below to embed this comment.
  16. I think your post could be simplified - you’re outlining iPhone password entry behaviour for desktop and laptop. The reason it works well for iPhone is the on screen keypad small and therefore is more prone to mistakes. Also, the last character feedback is useful because the distance between the keypad and input is small enough for the user to see both. The majority of people cannot touch type. I’ve observed laptop/desktop users whilst typing and they tend to concentrate on the keyboard until they have finished. So they won’t see the last character feedback. The long term solution would be to remove passwords entirely by identifying an individual using another method, biometrics perhaps. The medium term solution is to make open id the de facto standard for all services. There by only having to remember one strong password. The solution I recommend people use today is software like 1Password. It keeps an encrypted database of all your logins, which as the name suggests can be recalled by using one password. I’ve got over 100 logins in my database, which frees up my human memory for more important things. Small note on your demo’s implementation. I know it’s a proof of concept but your code removes the i-beam!
    Copy & paste the code below to embed this comment.
  17. I think your post could be simplified - you’re outlining iPhone password entry behaviour for desktop and laptop. The reason it works well for iPhone is the on screen keypad small and therefore is more prone to mistakes. Also, the last character feedback is useful because the distance between the keypad and input is small enough for the user to see both. The majority of people cannot touch type. I’ve observed laptop/desktop users whilst typing and they tend to concentrate on the keyboard until they have finished. So they won’t see the last character feedback. The long term solution would be to remove passwords entirely by identifying an individual using another method, biometrics perhaps. The medium term solution is to make open id the de facto standard for all services. There by only having to remember one strong password. The solution I recommend people use today is software like 1Password. It keeps an encrypted database of all your logins, which as the name suggests can be recalled by using one password. I’ve got over 100 logins in my database, which frees up my human memory for more important things. Small note on your demo’s implementation. I know it’s a proof of concept but your code removes the i-beam!
    Copy & paste the code below to embed this comment.
  18. I’ve been reading “The design of everyday things” recently and the author talks about UX and good design but makes the caveat that things like “security” may need to go against good UX design. An example he used is of a school door with a “bar lock” at the very top of the door to prevent kids from leaving early.  Its a security feature, but its clearly not “usable”.  It is good design, but bad UX. What would happen in a fire? The big problem with passwords is that it’s “knowledge in the head”.  And your absolutely right. Designers think that by putting a stared-out password box, that their website is secured. But our minds can only remember so much random stuff. How many passwords do you have? Think about it. You can’t possibly remember more than 5 or 6.  So you have to either write them down, make them all ultra simple, or make the vast majority of them the same password. How many people have the same password for their bank accounts that they have for their yahoo mail?? How secure it that? Forcing people to pick “strong passwords” that resist cryptographic attacks just forces people to write them all down (maybe even email them to themselves). The iPhone’s solution to visible passwords works well on a small platform with a touch screen, but I’m not sure its a good solution on a 24-inch display with a keyboard. I like the idea of a toggle for the password box to show the visible cleartext, but I feel there’s something more that’s needed. Can you provide a key to a website that doesn’t require you to memorize a long random string? Not a cookie, but something that you can use when you want to? I think it’s a better mapping to the problem. Loved the article. Great work making us think. ;)
    Copy & paste the code below to embed this comment.
  19. I’m surprised no one has mentioned something like Chroma-Hash: http://mattt.github.com/Chroma-Hash/ Knowing the colors is useless for shoulder surfers, but accomplishes the goal of the user knowing if the password was typed in correctly.
    Copy & paste the code below to embed this comment.
  20. The only security that the password field gives is from someone peeping ‘over the shoulder’. Why not leave the option to the user? If he/she is in the middle of the crowd, hide it, else show it. This was discussed in an article in the page below. The password widget has other ‘good to have’ password features too. “A rich password widget”:http://www.html-form-guide.com/blog/web-form-widget/54/web-form-password-widget/ Further, the ‘Show’ link in the widget doesn’t add any complexity to the widget.
    Copy & paste the code below to embed this comment.
  21. The phrase “it may possibly someday contain potentially sensitive data” is the most lame excuse for including passwords. Especially for sites that have open registration. Each time I see a forum or other website that requires you to register just to:
    * see the site
    * search on the site
    * display images
    * download attachments
    * provide feedback I think something went really wrong. Most of the time it’s just the site admin who either blindly follows the example of others, does’t really care about the users and wants to limit traffic by all costs or simply leaves the silly default settings on. There are also those “if they want to see my site I want their e-mail address first” types, but that qualifies for therapy—most of those addresses will be single-use spam pits anyways. If you really need to protect sensitive data, don’t put it on the internet in the first place. If plan to base the protection of this data on the trust and reliability of your users working hard to keep your site safe, you are going to be very disappointed. And it’s not really because it’s so hard to remember a password or to think of a good password recovery question. It’s simply because *they* don’t care about *your* site, and the more you are going to force them into working for you on this—by using password quality checkers (which, by the way, only make the passwords easier to guess by narrowing the pool), captchas, forcing password changes and such—the more they will resist and may even actively rebel—for example by posting the password on bugmenot. Most of the time you can give up the whole registration process and password and just let people do their work. Especially if you expect them to collaborate with you. And no, they don’t really need those custom user preferences, timezone, avatar and history of recent searches. And even if they do, you don’t really have to protect them with a password. Especially since 99% of your users won’t even bother to change the defaults. They won’t even bother to log in again with the same username, probably. Really, think twice, because often there is just a little change in your planning required to get rid of the passwords, at least from the most of your site. By the way, the security experts are probably going to hate me for this, but I honestly think that a single shared password is a great thing for small, closely collaborating groups. If somebody forgets it, others will remind. Of course, you have to change it if it leaks, that’s why it only works for small groups.
    Copy & paste the code below to embed this comment.
  22. An article about passwords that requires one to log in to comment? It has taken me 10 minutes to do so because:
    * I forgot the username, password, and email address I used to register
    * In order to retrieve my password, I had to try several email addresses; every email address that was not in A List Apart’s database generated this charming error message:
    “Database Error: Unable to connect to your database. Your database appears to be turned off or the database connection settings in your config file are not correct. Please contact your hosting provider if the problem persists.”
    * When I finally remembered which email address I’d used, ALA sent me two reset requests. The first one sent to me generated the same “Database Error” message
    * ALA then emailed me my username and new password in the clear Perfect illustration of some of the points made above, that is, requiring login for relatively trivial things is:
    * frustrating to users, who have to remember many dozens of username / password / email combinations if they are attempting to be at all security-conscious
    * completely pointless if you are going to email complete login details I’d also second the point that passwords should be allowed to be long enough that we can use phrases or complete sentences as passwords, preferably with punctuation and phrasing. Nothing more frustrating than trying to enter a memorable, long, complex password to be told something along the lines of “only 12 letters/numbers allowed”. Stop requiring logins for trivial tasks, and make it easier to have long, memorable passwords. Thereby reduce the need to expose letters somehow during password entry, with all the attendant problems of reduced user confidence and increased chance of shoulder surfing.
    Copy & paste the code below to embed this comment.
  23. I like both options but think I would go with option 2. The user wont have to do anything different.
    Copy & paste the code below to embed this comment.
  24. @Catherine Williams: There are problems with not needing to login to post comments. Obviously, there are spambots. But as many other sites have noticed, and personally I agree, allowing anonymous comments is just asking for trolls and posts that are, well, mean. I personally agree with the need to have an account and login to comment on a post. And sure they’ll email you your login info; they’re assuming that the email address that you gave them is an account only used by you, so what’s the harm? I definately agree about password length though. I’ve been using variations of a randomly generated password (that i was given by some site years ago…) for awhile now. The passwords based on this are easy for me to remember, because i’ve been using them so long, but many sites will only allow short passwords. I’ve seen “Between 6 and 8 characters” and the worst password system I’d ever seen was: “Your password must be exactly 8 characters including at least 1 number”... Personally (as a web developer like most of you probably are), I can see no good reason to limit the length of passwords so much. I can understand needing a limit, but 64 or 128 characters wouldn’t really slow down a login/users database. More importantly, for sites that do not email you your password, there’s no reason not to keep only a hash of it, therefore making the actual length irrelevant.
    Copy & paste the code below to embed this comment.
  25. In response to tddewey (#4), I agree that some things are better left to the browser.  Although it’s easy to understand the need to use JavaScript to mimic more desirable behavior, it’s generally a lot more overhead than it’s worth, even if you’re using a library. Coincidentally, the second demo doesn’t show the cursor in Firefox 3.6/Mac (not on focus nor as you type).  This is a prime example of the overhead that I’m talking about: The “solution” has introduced another usability issue that, in my opinion as a user, outweighs the initial problem.  Good luck spending hours troubleshooting things like this on all browsers/platforms. Not to say it’s a bad idea, but it’s better left to the browser to handle.  Not only will the functionality work properly, but users will be able to set their preferences while having consistent behavior on all websites, not just one. If anything, this is something that the HTML 5 draft should be looking at.
    Copy & paste the code below to embed this comment.
  26. For this technique to be effective in the wild, the implementation must have the same functionality as the original, but with the added benefit of self-validation. I believe that somehow implementing synchronised feedback between both the mask layer and the input layer (when highlighting) is essential in ensuring a usable improvement to the password field.“service directory”:http://www.myservicemonster.com/ There is either an issue masking the text or there isn’t. If there is, then half-masking or toggle-masking isn’t a solution — it adds another layer of complexity to the interface. The only real solution is clear text (which I personally agree with). n addition to the two methods listed, the only other suggestion that I can give to help users input their passwords correctly is to warn them that caps lock is on. Sadly we can’t do this until the user actually presses a button. I think web designers/developers should do their part and make the site as secure as possible, everything else is the users responsibility.
    Copy & paste the code below to embed this comment.
  27. @Chibu
    “And sure they’ll email you your login info; they’re assuming that the email address that you gave them is an account only used by you, so what’s the harm?” Um. Emailed usernames and passwords can easily be intercepted without anyone hacking your email account: packet sniffers make unencrypted email about as secure as sending snail mail by handing an unsealed envelope to a random passer by and asking them to pass it on. Hence the recommendation never to send a credit card number, social security number, bank account details etc via email. Good point about wanting to forestall comments by trolls, flamers, spammers etc. Requiring login doesn’t deter all such problems, though. Someone determined can just make new accounts (and account creation can be automated: a problem I’ve seen on a wiki recently). There are other ways to prevent such issues (moderation, captchas, automatic filtering for “banned” terms, etc), although admittedly these all have flaws too. One further issue with password security that I’ve encountered: it’s all too easy to type a password into the wrong box or the wrong window. When you’re concentrating on entering every character correctly, you tend to be looking at the keyboard, not the screen. Thus, you don’t always notice that the focus is in / has shifted to the wrong place. This happened to me yesterday, when entering a chatroom password: my client popped up a window for me to enter the password but didn’t automatically move the focus there. Instead, the focus remained in the chatroom. I didn’t notice: I just typed in the password and pressed “enter”.... so ended up sending my password to the world. Since I make sure to have completely different user names and passwords for every account, this wasn’t too big a deal, but it was still a hassle to have to scurry around to reset it.
    Copy & paste the code below to embed this comment.
  28. @samadamssmith et al. If you use MooTools (I just love MooTools: mootools.net), a great and easy way to check for caps lock is to use the Caps Lock plugin found on the MooTools forge: CapsLock @ http://mootools.net/forge/p/capslock Known Issues: Since CapsLock has to first sniff the state of the caps lock key, there can be a delay between user input being able to provide feedback via the events. Specifically, until there is a keypress event where the user types in a lowercase letter with shift pressed down or they type in an uppercase letter without shift, these events won’t fire. Additionally, if the user un-focuses the window and comes back, we have no way of knowing if the caps lock state was changed during that time so CapsLock resets its state when this happens to ensure no false positives so a re-sniffing will be done. In practice though, users will type in their username or other data first which will establish the state of the caps lock before moving on to the password field where these events are most useful. This means there will be no discernible delay on the user’s side and will allow you to provide accurate visual feedback.
    Copy & paste the code below to embed this comment.
  29. There’s a nice solution if you have a site with users that mistype their passwords all the time (If you do not, then I’d argue this solution overkill.): You devise a small script that takes the content of the password-field and generates a digested string from it. (By for instance using MD5.) You use this string to construct a small graphic, for instance 3 bars with different colors. You make it so the colors of the bars are created from the digisted string. The bars are shown every time a user types a password. After a while the user learns how “his/hers” bars look when the password is typed correctly and it becomes second-nature. Because MD5 generates very different outputs from even single character changes, the bars will look very different if you mistype your password, and the user will feel that something is wrong. You can see this is action here: letsmix.com (click Login and try a user/password) But as I said, unless you actually have a problem with people mistyping passwords all the time, I’d say it just adds noise. Your users also need to be smart to pick up on it, which, well… Otherwise, I subscribe to the idea that showing passwords in clear-text is fundamentally wrong.
    Copy & paste the code below to embed this comment.
  30. The two form examples in the article just show how demasking a password would typically look like. They don’t demonstrate how browsers actually act when you submit logon details to a web site. Since example one basically changes a password field to a text field, the following security and usability issues emerge once the user submits her password after choosing to see it in plain text:
    # Since the browser doesn’t see a password field, it doesn’t ask the user whether she wants to save it upon submitting.
    # And what is worse: The next user on the same computer can enter the previous one’s user name in the user name field, tick the `Show password’ box and double click in the password field. Most browsers will reveal the previous user’s password - in plain text. A web developer *can not* let this happen! On my blog I have posted an example where we keep the visual design of the original example one, but still let browsers understand that the password being typed is a password, and thus continue password-handling in their usual way. So how is this done? Well, approximately like this:
    # When the user checks the `Show password’ box, a new, empty text field is created, and the original password field is hidden behind the new field.
    # As the user types her password in plain text, the input in the new field will will be inserted in the invisible, original password field.
    # When the user submits her data, or chooses to not show her password anymore, the text field with the password disappears (for good). On my blog you can test example youself. Go ahead and read it on “http://www.imers.no/passwords-no-problem”:http://www.imers.no/passwords-no-problem
    Copy & paste the code below to embed this comment.
  31. @olaim, the only problem I have with using a separate text field is that because it needs its own unique name and ID, it won’t inherit ID-based CSS or JavaScript, so it’s less transparent in that way. Several comments, though, seem to think that revealing the password in plain text somehow creates a security problem. The fact is that it’s stored that way in the DOM anyway. JavaScript can read it, and it’s transmitted as text in the HTTP request (which will hopefully be encrypted using SSL/TLS). I maintain that the only threat model masking protects against is physical observation. Dots in a form are not encryption. As far as autocomplete goes, it can be disabled by code as well (beyond the scope of my demonstration). A public/shared computer shouldn’t have it turned on anyway, as we’re likely to type all sorts of sensitive data into non-password text fields (credit card numbers for example).
    Copy & paste the code below to embed this comment.
  32. I agree making passwords clear text or will help security or people remember passwords, the options mentioned do help people remember. A great example is Media Temple’s account pages.  There are multiple passwords I manage for my account such as FTP, email, and my over all system password.  If I forget a password I would have to reset it.  BUT Media Temple gives me the option to show my password in clear text, keeping me from reseting it. Great article!
    Copy & paste the code below to embed this comment.
  33. Virgin Credit card use a novel method of seperation; forcing the user to enter a username, then on the second page asking for a password. Not bulletproof but it would slow down any script used in bruteforce hacking. Out of the examples provided I prefer #1 as I can see that people at home using their PC’s would care more about being able to log in correctly then someone in the household seeing their password. It’s an odd UX challenge when you consider that password hashing has been present in software since the 70s and people are very much used to it, so I cant see a huge advantage to modifying the default password hashing behaviour.
    Copy & paste the code below to embed this comment.
  34. I agree that the ‘iPhone’ method is a good idea and could improve user experience when logging into a site.  My only problem here is that Apple didn’t invent this.  It has been around on mobile devices for years before the iPhone even existed (Windows Mobile, to give one example).
    Copy & paste the code below to embed this comment.
  35. Echoing the comments raised above, the irony is that ALA fails dismally in password management. For some reason the username and password I used to use stopped working and I now have a new username and password that I can’t remember. So I have had to request a new password, which I won’t be able to remember, and I can’t see any way to change it to one that I will remember. So every time I want to comment on an article I will have to go through the same wretched process. Password restrictions are far too complex. Many sites require people to register, even though there is no good reason for doing so. Many sites that need passwords have particular requirements, in terms of length of password and type of characters - some can only include letters and numbers, some must use capital and lower case, some must include non-alphanumeric symbols - all of which means that users have to use multiple different passwords, which significantly increases the chance of them failing to remember the right password, or choosing a password that is blatantly guessable. As for Nielsen’s suggestion of putting passwords in plain-text - no, no and no! I did email Nielsen the day after he wrote that article to point out a number of usability flaws in his plan, but of course there has been no response or follow-up, as his articles are the gospel truth from the one true guru and are not susceptible to suggestions or improvements by mortal plebs like the rest of us (sorry, rant over)... Firstly - security concerns. Passwords have been masked since time immemorial because it prevents other people standing nearby from reading them. Allowing them in plain text would be criminally negligent in terms of exposing accounts to hacking. You might as well just write a list of all your passwords on a piece of paper and stick it to your monitor. I can see the argument for allowing plain text on a device like an iPhone that can’t easily be seen by other people, but on a normal monitor, it is totally unacceptable. Secondly - usability. When I am logging into a website, I know that what I see in plain text is my username, and when I see a string of asterisks or blobs then I’m typing my password. That is a valuable visual cue, and can help prevent instances like the one where a previous contributor typed their password into a chat box. People are used to the way logins work now, and changing it would raise a number of problems while offering minimal benefits.
    Copy & paste the code below to embed this comment.
  36. <div>Those are good scripts, but there’s a little bug in the second alternative script.
    In the part that says:var input = inputs; It should say:var input = password_inputs; The original will break when there are input elements other than password.
    </div>
    Copy & paste the code below to embed this comment.
  37. Ups! (it appears that HTML doesn’t render as source code as said in the comments form)var foo; //The "<pre>" tags shouldn't appear
    Copy & paste the code below to embed this comment.
  38. I like the idea with the checkbox behind it but it will make your form realy wide. BTW in example2 if you type fast you will not see your last char. (or at least in chrome.)
    Copy & paste the code below to embed this comment.
  39. I can’t wait until all sites implement “show password” checkbox, so I’ve made “Show Password on Focus”:http://github.com/NV/show-password-on-focus.js (“Chrome extension”:https://chrome.google.com/extensions/detail/ogjaejebjmifpkiaafdnnpkkjnmopmhn and “user script”:http://userscripts.org/scripts/show/68664 ).
    Copy & paste the code below to embed this comment.
  40. Am I the only one - who cant remember brazillions of userids and passwords? Guy kawasaki blogged last year - about web sites expecting one to remmeber all sorts of permutations and combinations: oh this doesnt take - here its user name !! and well, there is another annoying thing aside from hacks and what else..: its verify and then the captcha and while i am at it: can someone break the news to lemondrop - verifying every comment - via a click to email = bad karma on the net cheers, regards and regrets olga-nesher-lednichenko
    Copy & paste the code below to embed this comment.
  41. I have test it and work very well, and its a very nice idea. The only think I like to notice is that you can check if the password is allready there by the browser, and if it is do not show the button, because then its easy for some tried person to see it in a second. So add this line if(input.value == “”) to not show anything if the password exist there from the browser. if(input.type == ‘password’) {
      if(input.value == “”)
      {
    Copy & paste the code below to embed this comment.
  42. @Aristos: To disable the `Show password’-button if the browser pre-fills it for you, is a good idea. But it still means that a person sitting next to you could see the password you have just typed into that field, if he is quick (and a not so good friend). What I proposed in my former post will prevent this from happening: bq. 1. When the user checks the `Show password’ box, a new, empty text field is created, and the original password field is hidden behind the new field. Then no one will ever see what anyone (else) has written in the password field.
    Copy & paste the code below to embed this comment.
  43. The idea of having clear text passwords may be alright if I’m working on my home pc but if that was the web standard then User accounts would be getting hacked left,right and centre. 
    The idea to toggle between the two is okay but involves more code and maybe over complicates the login process however admittedly I have used the feature on my router before. Personally I think a less secure easy to remember password is better than having only a clear text password input field, but I would personally always recommend using strong passwords and having them hidden from view.
    Copy & paste the code below to embed this comment.
  44. Any time you use JavaScript to access and store passwords, you are demonstrating what any advertiser can do on your site.  Truly, the only reason why the user name/password combination is in prevalent use today is because it is easy to implement.  Other options that are arguably more secure such as PKI (caveats with that as well) and biometrics are notoriously difficult to do on the web. I like the concept of OpenID, which provides some creative ways around the whole user name/password concept.  For example, the people at “My OpenID” (myopenid.com) provide an option to generate a key that is specific to your browser.  As long as your browser has that key and you have the password to that key you can get into any website that supports the OpenID protocol.  Of course, this presents problems with internet cafes. The real solution is to find something other than arcane passwords to protect access to the site, that still gives both the web site and the user a high confidence level.  A real solution will also address site spoofing (phishing attempts) which is a real problem. Any solution that allows access to what I typed through JavaScript demonstrates just how easy it is to steal credentials.  To all web designers: do not allow advertising on any page that takes in passwords.  It is too easy to accidentally include malicious ads, and even in HTML 5 there is no appropriate sand-boxing of content that originates from other servers.
    Copy & paste the code below to embed this comment.
  45. There are obvious usability issues with not being able to see the password you are typing.  There are also times where it would be more practical to just see a password in an admin panel rather than have to reset it.  There’s no rational reason why a person signing into their “A List Apart” account from their own office shouldn’t be able to see the password as they are typing it.  Regardless of this, making this information visible might draw complaints from users because it is different from their expectations.  There are also many times when the highest level of security is critical. Having a “View your password as you type” link is a no-brainer for non-senisitive logins.  It allows the user to judge whether they feel secure in their environment.  Additionally, a popup layer could provide additional instructions “Use this if you are in a private location.” Taking responsibility for this, improves the success of the site.  So why leave it to the browser or os.  Most users will not know how to use these features anyway.
    Copy & paste the code below to embed this comment.
  46. function togglePassword(elementId, showText) {
      var newPasswordField = $(elementId).clone(true);
      $(newPasswordField).attr(‘type’ , showText ? ‘text’ : ‘password’);
      $(elementId).replaceWith(newPasswordField);
    }
    Copy & paste the code below to embed this comment.