Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Better Passwords

Security covered Under active development 3,852 sites

This module helps users create stronger passwords by enforcing current recommendations from the US National Institute of Standards and Technology (NIST). It checks passphrases for length and strength using the zxcvbn-php library, prompting users to choose a different one if it doesn't meet the minimum requirements.

Better Passwords attempts to help users create better passwords by adhering to current recommendations from the US National Institute of Standards and Technology (NIST). This agency, part of the United States Department of Commerce, periodically publishes recommendations that have been extremely influential in determining standards for information security. The most recent recommendations on management of passwords is in NIST Special Publication 800-63B, "Digital Identity Guidelines," section 5.1.1.2, "Memorized Secret Authenticators." (https://pages.nist.gov/800-63-3/sp800-63b.html#sec5)

Drupal core already meets or exceeds many of the NIST standards for creating and maintaining safe passwords; this module aims to get the rest of the way.

It should be noted that creation of an effective password, and safe storage thereof, is usually only part of an appropriate solution for authentication of digital identity; many organizations will need to use some form of two-factor authentication to fully adhere to NIST recommendations.

Installation

Better Passwords requires the zxcvbn-php library available at https://github.com/bjeavons/zxcvbn-php.

The easiest way to install this module is to use composer, which will also install zxcvbn-php as a dependency:

composer require drupal/better_passwords

Enable the module as you would any other Drupal module.

Configuration

Better Passwords should not require configuration for most sites. A few options and a lot of information will be available at admin/config/people/passwords.

Differences from the Password Policy module

The Password Policy module allows and even encourages site administrators to employ configurations that have proven to result in less secure passwords. Its modular architecture invites site administrators to develop a password policy through a creative process of choosing and configuring options from among a wide range of plugins that constrain users' choices.

Better Passwords is designed to implement only recommended security practices. Just as site administrators cannot choose to store passwords in plain text, they should not be able to force users to reset their passwords periodically, because that choice also results in less secure passwords.

Architecture

Better Password alters the password_confirm element to provide a verification step, upon which it checks the passphrase for length and uses the zxcvbn-php library to determine its strength. If the passphrase does not meet minimum requirements, the user is requested to choose a different passphrase.

Drupal 9–11

Ask your assistant about Better Passwords

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Sep 2023
Latest release
3 months ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.2.2 Stable 9–11 Jul 7, 2026
2.x-dev Dev 9–11 Jul 1, 2026
2.2.1 Stable 9–11 Oct 2, 2025
2.2.0 Stable 9–10 Sep 29, 2023