jbrada / module-well-known-change-password

jbrada/module-well-known-change-password

This Magento 2 module provides a well-known endpoint for the 'change password' functionality, allowing seamless redirection to the customer password change page.

magento2-module Compatibility: 2.4.7-2.4.9 Code Quality: Pass Tests: Pass Security: Pass MIT

JBrada - Well-Known Change Password Magento 2 Module

Code Analysis
Tests

Overview

The JBrada_WellKnownChangePassword module implements the .well-known/change-password standard for Magento 2. This allows password managers to easily locate and redirect users to the correct URL when they wish to change their password.

While there are multiple ways to achieve this functionality, such as adding custom URL rewrites in Magento or configuring the webserver, this method directly integrates it within Magento itself. By doing so, the URL is permanently tied into Magento, eliminating the need for further configuration or maintenance.

The module creates a well-known URL /.well-known/change-password that redirects to the Magento customer edit page, where users can manage their account and update their password.

Installation

To install the module via composer, run the following command:

composer require jbrada/module-well-known-change-password

Enable the module in Magento:

bin/magento module:enable JBrada_WellKnownChangePassword
bin/magento setup:upgrade

Usage

Once installed, the module automatically exposes the /.well-known/change-password URL on your Magento site. When visited, this URL will redirect to the customer password change page where users can manage their password.

Example

If your Magento store URL is https://example.com, visiting:

https://example.com/.well-known/change-password

will redirect to:

https://example.com/customer/account/edit/changepass/1/

Tools Implementing This Standard

This standard is already supported by a number of tools, including:

  • iCloud Keychain (iOS 12)
  • Safari 12
  • 1Password (1Password 8, and 1Password for Chrome, Firefox, Edge, and macOS Safari)
  • Chrome 86
  • Backdrop CMS (via the Well-known module)

License

This module is licensed under MIT license. Please refer to the LICENSE.md file for more information.

Note on Testing

This repository utilizes ExtDN's GitHub Actions for Magento 2 to run tests in GitHub Actions.

About

This project is created by Jiří Brada and is a non-profit initiative to support the Magento community.

Have feedback? I'd love to hear from you.

Connect with me on LinkedIn or visit my website.

No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
0.0.6 stable Pass Magento 2.4.7-2.4.9 Details 2024-10-15 11:58:36
0.0.5 stable Not tested Not yet tested Details 2024-10-15 07:56:36
0.0.4 stable Not tested Not yet tested Details 2024-10-15 06:53:46
0.0.3 stable Not tested Not yet tested Details 2024-10-15 06:24:16
0.0.2 stable Not tested Not yet tested Details 2024-10-15 06:15:37
0.0.1 stable Not tested Not yet tested Details 2024-10-14 22:33:42

Requires 4

Package Constraint
php ^8.1
magento/framework ^103.0
magento/module-store ^101.1
psr/log ^1.0.1 || ^2.0 || ^3.0

Requires-dev 5

Package Constraint
bitexpert/phpstan-magento ^0.32.0
dealerdirect/phpcodesniffer-composer-installer ^0.7 || ^1.0
magento/magento-coding-standard *
phpstan/phpstan ~1.7
phpunit/phpunit ^9.5

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Pass 0
PHPMD Pass 0
Cpd Pass 0
Composer validate Pass 0

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
MIT
Authors
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.