[**Documentation**](../../../README)

***

[Documentation](../../../README) / [zerotal](../../README) / [auth](../README) / isPasswordCompromised

# Function: isPasswordCompromised()

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

Defined in: [packages/auth/src/CompromisedPassword.ts:36](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/CompromisedPassword.ts#L36)

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`](../interfaces/CompromisedCheckOptions) = `{}`

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

## Returns

`Promise`\<`boolean`\>

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