Skip to main content
zerotal

Documentation


Documentation / @zerotal/auth / isPasswordCompromised

Function: isPasswordCompromised()

isPasswordCompromised(password, opts?): Promise<boolean>

Defined in: auth/src/CompromisedPassword.ts:36

Returns true when the password appears in the breach corpus at least threshold times. Fails open (returns false) on any network/API error, so an outage never blocks a legitimate sign-up.

Parameters

password

string

The plaintext password to check (never sent in full).

opts?

CompromisedCheckOptions = {}

threshold (min breach count, default 1) and endpoint override.

Returns

Promise<boolean>

true when the password is compromised at/above threshold, else false.