Breached passwords
SpartanAuth compares passwords with the Have I Been Pwned Pwned Passwords list and remembers the result for each current password. You can watch that risk in the dashboard before you block anyone. Two sector settings, both off by default, control what happens next: refuse a new breached password, or stop password sign-in until the person chooses a new one.
The password itself is never sent to Have I Been Pwned, and neither is the email address. SpartanAuth sends only the first five characters of the password’s SHA-1 hash and checks the matching range locally. A wrong password guess is not checked. Passkey, email-code, and social sign-in are not part of this check, because those accounts have no password.
What is recorded
Section titled “What is recorded”A check runs when SpartanAuth has the password in hand:
- An administrator creates a user with a password
- Someone completes self sign-up, an invite, or a password reset
- A signed-in user changes their password
- A password sign-in succeeds
The dashboard then shows one of these states:
| State | Meaning |
|---|---|
| Breached | The password appears in the published breach list. The detail view includes how many times it was seen, when that number is available. |
| Clear | The password was checked and was not in the list. |
| Not checked yet | SpartanAuth has not had the plaintext since this feature was available. Bulk-imported password hashes stay here until that person signs in with the password. |
| Check pending | The breach list did not answer. The previous clear or breached result for that same password is kept. |
| No password | The account signs in with a passkey, email code, or social login and has no password. These accounts are left out of the breached ratio. |
Replacing a password replaces the stored result. The new password is checked on its own.
Recording does not depend on the switches below. Leave both off and you still see who is affected. Turn them on when you are ready to enforce.
On a new self-hosted install, the first administrator password is saved before a check can run. It is recorded the first time that password signs in.
Turn it on
Section titled “Turn it on”Open the app sector your users sign in to and go to its security settings. The tenant root’s settings do not apply to your app. Both options start off.
- Reject breached passwords. A new password that is in the breach list is refused. This covers self sign-up, invites, password resets, and passwords an administrator sets. The person stays on the form and can choose another password. An invite or reset code is not used up by that refusal.
- Require reset of breached passwords. After a password is already known to be breached, a correct password cannot finish sign-in. SpartanAuth returns no session. The person replaces the password with the usual emailed reset code. Sessions that are already signed in stay valid until they expire. This setting does not sign people out.
If either setting is on, choosing a new breached password is refused. A signed-in password change always refuses a breached replacement, even when Reject breached passwords is off.
If the breach list cannot be reached when a password would be refused, the password is not saved. The message is “password could not be checked against known breaches, try again.” At sign-in, a password already recorded as breached still cannot finish sign-in while the reset requirement is on. A password with no stored result is allowed through until a later check can answer.
Self-hosted instances can set HIBP_API_KEY. The range API works without a key. A key raises the rate limit on the Have I Been Pwned side.
What administrators see
Section titled “What administrators see”Home shows a Breached passwords count for the sector you are viewing: how many are breached, how many have been checked, and how many are not checked yet. A check that got no answer is called out as waiting on the breach list. The count is not written onto access tokens, introspection, or the user’s profile claims.
Users adds a password filter and a badge on each row:
- Breached
- Not checked
- Check pending
- Clear
- No password
Open a user to see the same state, the breach count when the password is breached, and when it was checked. Send password reset emails that person the sector’s normal password-reset message. There is no separate breach email. The reset still has to be completed with a code, and the new password is checked before it is saved.
Sector admins see this for their sector. A tenant-root admin can open any app sector in the organization and see that sector. A tenant-wide count reads the current tenant database once.
What end users see
Section titled “What end users see”Password sign-in is paused
Section titled “Password sign-in is paused”This happens only when Require reset of breached passwords is on and the password they just entered is already known to be breached. The password was correct. Sign-in still stops, and a second factor on that attempt cannot finish it.
The login widget shows Reset your password and explains that sign-in is paused because the password appeared in a data breach. Email me a reset code sends the usual reset email. The user enters the code and a new password on the next screen. A breached replacement is refused, and the code stays valid so they can try a different password. After the reset succeeds, they return to the sign-in form and sign in with the new password.
Back returns to the sign-in form. No session is stored.
Passkey sign-in and email-code sign-in continue as usual. Someone who can sign in that way is not stopped by this setting.
Account settings
Section titled “Account settings”A signed-in user whose current password is breached sees a warning in <spartan-account-settings>, including when the reset requirement is off. The warning includes the breach count when SpartanAuth has one. From that warning they can:
- Email me a reset code, sent to the email on their profile
- Set a new password directly, by entering the current password and a new one, then Update password
The warning disappears after the new password is saved and checked clear. A signed-in user whose password is clear, unchecked, or still pending does not see the warning. They can still change the password from the same section.
Choosing any new password
Section titled “Choosing any new password”Self sign-up, invite completion, password reset, and the account-settings form all show the server’s reason when the new password cannot be saved:
- “this password has appeared in a data breach”
- “password could not be checked against known breaches, try again”
Those screens no longer describe that failure as an invalid or expired code. The user picks another password and submits again.
The login and account-settings copy is included for English, French, Spanish, and Japanese.