govuk-design-system-backlog icon indicating copy to clipboard operation
govuk-design-system-backlog copied to clipboard

Passwords

Open govuk-design-system opened this issue 6 years ago • 16 comments

Use this issue to discuss this pattern in the GOV.UK Design System.

See also Identifying users

govuk-design-system avatar Jan 12 '18 16:01 govuk-design-system

Dropbox Paper audit

On 15 October 2018 the Design System team reviewed a Dropbox Paper document called Create a password.

The aim was to reduce the number of places containing guidance and code by:

  • migrating relevant, useful content into the Design System itself
  • recording important research findings in the community backlog
  • removing the original Dropbox Paper page

Below is a record of the outcomes of that review.

Review outcomes

Updates to the Design System

The Design System team will carry out the following updates to ensure that relevant, useful content from the Dropbox Paper file is added to the Design System.

  • [x] Add content to the research section of the Design System guidance saying research is needed on inline password validation for users creating a password

Research and examples

The following example was shared in the original Dropbox Paper file and some further research is needed on whether using inline validation to help users who are creating a password is helpful:

image_preview

If you have experience or examples of using inline validation to help users create a password, please share your findings and screenshots in a comment below.

amyhupe avatar Oct 15 '18 13:10 amyhupe

I think the gif above is from GOV.UK Verify, that I worked on. We iterated on this pattern - starting without any inline validation, just the password requirements.

We found that users find it very hard to meet password requirements, even with the password visible, as above. Making the requirements status update in realtime helped them understand which requirements they had met, and which they had not.

With less complicated requirements, inline validation may not be necessary.

joelanman avatar Oct 16 '18 14:10 joelanman

DFE Sign in have an eye icon to indicate a show/hide password toggle. I don't know how well it tests.

I think the code is here: https://github.com/DFE-Digital/dfe.ui.toolkit/blob/15aade4b481e84839bace40f3773f2d1c66238b2/app/views/change-password-current.html

screen shot 2018-11-21 at 13 19 31 screen shot 2018-11-21 at 13 19 38

fofr avatar Nov 21 '18 13:11 fofr

Hi,

I found the password guidance really useful. I had one question that I didn't see covered that I wondered if there was opinion/consensus on. A quick skim of the NCSC guidance didn't find me anything.

When a new user registers and sets their new password (or similar for resetting a password), should you include a 'confirm' field for the password to be entered a second time so you can check it matches the first?

Notify don't appear to - https://www.notifications.service.gov.uk/register The Digital Marketplace appear to - https://github.com/alphagov/digitalmarketplace-user-frontend/blob/20ee069938a4b3bf718eeed49de688d7d215079a/app/templates/auth/change-password.html

Note, this question is more out of my own curiosity when doing some learning about passwords and login patterns so doesn't need a speedy response or any real effort put into investigation.

Thanks!

idavidmcdonald avatar Jan 10 '19 14:01 idavidmcdonald

@idavidmcdonald I am interested too.

When you create a Government Gateway user ID it asks you to confirm your password.

image

stevenaproctor avatar Jan 10 '19 15:01 stevenaproctor

This was prompted by a discussion with the Barnardo's Design System team.

To continue @fofr 's example of password masking toggling.

It feels like many services are giving the option to users to toggle a masked password field, is anyone else doing this in production?

Questions

  1. What considerations would need to be done regarding accessibility?
  2. How well does it test?

Resources

Results prove that unmasked passwords were unexpected by participants and when forced upon them a mixed result is gained. Some appreciate the usability benefits, whilst others believe there is an error on the site. This causes them to lose trust in the buying process.

However when participants are offered the choice of masked or unmasked passwords within the interface, participants identified the concept as a feature not an error. Participants identified the usability benefits of clear text passwords and the security benefits of masked passwords. When participants used this option, there was no impact to trust in the e-commerce website.

Conclusions

  • Clear text passwords do increase usability, but don’t force the change upon your customers.
  • Offer it as an option and let them use it when they feel comfortable.

NickColley avatar Jan 23 '19 17:01 NickColley

Has anyone looked into error messages for new passwords? We have a situation where the system could identify that a new password is 'too easy to guess' (i.e. the user is including their name, email, date of birth, etc.). Interested to find out how others are solving this - what does the error message say, do you have different error messages to handle different non-compliance issues (i.e. one for wrong format, another for too easy to guess) or just one?

RhysDavi-es avatar Oct 24 '19 11:10 RhysDavi-es

It might be good to add guidance around how to use the autocomplete attribute when asking users to change their password – specifically using autocomplete="new-password", to help teams meet WCAG 2.1 1.3.5: Identify Input Purpose.

36degrees avatar Nov 07 '19 17:11 36degrees

Password reveal component in the MOJ Design System

hannalaakso avatar Jun 03 '20 09:06 hannalaakso

From a slack discussion. The guidance says "show the last typed character of their password". People think this text has been written based on a known pattern which doesn't show the last character indefinitely - it becomes hidden after the next character is typed or after [x] seconds whichever is sooner. Nobody reported having ever seen a service doing it and people thought it would be tricky to do. A show/hide password button might be easier to implement. Comments?

terrysimpson99 avatar Aug 04 '20 07:08 terrysimpson99

I asked on slack about this, to see if there was any examples. (thanks for the nudge @terrysimpson99)

It was pointed out on mobile that this functionality happens by default, so I was wondering if anyone had implemented this on desktop? (I started and it seemed super hacky and awful).

I guess the assumption is on desktop the show/hide buttons would be more valuable (people who don't type and look at the screen etc)

htmlandbacon avatar Aug 04 '20 09:08 htmlandbacon

For context, these lines appear to have been taken from the original passwords 'pattern' in the Service Manual:

To help users meet your password constraints and prevent mistyped passwords, you can:

  • let them see their password if they want to
  • show the last typed character of their password
  • make them enter their password twice and automatically compare them

http://web.archive.org/web/20171208002107/https://www.gov.uk/service-manual/design/passwords

36degrees avatar Aug 17 '20 14:08 36degrees

https://incl.ca/show-hide-password-accessibility-and-password-hints-tutorial/

joelanman avatar Mar 18 '21 14:03 joelanman

There's an interesting blog post from GOV.UK Accounts about their 'Show password' functionality: https://technology.blog.gov.uk/2021/04/19/simple-things-are-complicated-making-a-show-password-option/

36degrees avatar Apr 21 '21 14:04 36degrees

https://www.otto-js.com/news/article/chrome-and-edge-enhanced-spellcheck-features-expose-pii-even-your-passwords

This blog post highlights the risks of a 'show password' toggle allowing a user to accidentally share their password (or part of it) with an external (remote) spellchecking service built into their browser. Browsers will ignore spellchecking text within inputs with a type attribute of password, but most of the 'show password' toggle implementations switch that type to be text when the user enables the visibility of their password.

Any implementations should probably set the spellcheck attribute to be false in order to prevent text being sent off for spellchecking.

philwolstenholme avatar Sep 19 '22 23:09 philwolstenholme