WEB-169Optional
Point password managers to your account pages
Redirect /.well-known/change-password to the page where people change their password. If they can use passkeys, also publish /.well-known/passkey-endpoints, and /.well-known/webauthn when several of your domains share passkeys.
How to do it
Answer change-password with a temporary redirect (302, 303 or 307), as the W3C change-password draft sets out. Browsers first fetch /.well-known/resource-that-should-not-exist-whose-status-code-should-not-be-200 and trust the redirect only if that answers 404. passkey-endpoints is JSON with enroll (the page that creates a passkey) and manage (the page that lists them). Password managers use it to offer a passkey upgrade. It is a W3C Working Draft, so check the latest version. webauthn lists the related origins in an origins array, as WebAuthn Level 3 Related Origin Requests sets out. Browsers only promise to accept five distinct site names there. Serve both JSON files on the host that is your relying party ID, as application/json. Ask for the current password before a change, as Ask again before changing how someone logs in says. Check each origin on the server, as Verify every passkey answer on the server says.
Examples
nginx example
location = /.well-known/change-password {
return 302 https://example.com/account/password;
}
JSON example
{
"enroll": "https://example.com/account/passkeys/new",
"manage": "https://example.com/account/passkeys"
}
JSON example 2
{
"origins": [
"https://example.com",
"https://shop.example.com"
]
}
How to check
curl -sI https://example.com/.well-known/change-password shows a 302, 303 or 307 with a Location on the password page, and the test address above returns 404. Each published JSON file answers 200 as application/json. Both URLs in passkey-endpoints answer 200 after sign-in, and a passkey made on one listed origin signs in on another.
Sources
- W3C A Well-Known URL for Changing Passwords
- W3C A Well-Known URL for Passkey Endpoints
- WebAuthn Level 3 (Related Origin Requests)
Related rules
- WEB-168 Serve standard files at fixed addresses in Website
- ACC-78 Ask again before changing how someone logs in in Accounts and identity
- ACC-9 Verify every passkey answer on the server in Accounts and identity
- ACC-8 Offer passkeys first in Accounts and identity
- ACC-10 Keep the password manager's passkey list current in Accounts and identity
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/standard-addresses/change-password">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.