Skip to main content
zerotal

Documentation


Documentation / zerotal / auth / PasskeysOptions

Interface: PasskeysOptions

Defined in: packages/auth/src/Passkeys.ts:78

Properties

rpName

rpName: string

Defined in: packages/auth/src/Passkeys.ts:79


rpId

rpId: string

Defined in: packages/auth/src/Passkeys.ts:80


origin

origin: string | string[]

Defined in: packages/auth/src/Passkeys.ts:81


timeoutSeconds?

optional timeoutSeconds?: number

Defined in: packages/auth/src/Passkeys.ts:82


requireUserVerification?

optional requireUserVerification?: boolean

Defined in: packages/auth/src/Passkeys.ts:95

Require the authenticator to verify the user — a PIN, a biometric, or an unlock — rather than merely to be present. Defaults to true.

This is what makes a passkey multi-factor. With verification off, an assertion succeeds on possession of an unlocked authenticator alone: whoever picks up the phone or laptop is the user, and the passkey is one factor, not two. Both ceremonies request userVerification: "required" and both verifications reject uv=0.

Set false only for a deliberate single-factor "device is the credential" flow, and then do not count the passkey as a second factor.

Methods

findUserCredentials()

findUserCredentials(userId): Promise<PasskeyCredential[]>

Defined in: packages/auth/src/Passkeys.ts:96

Parameters

userId

number

Returns

Promise<PasskeyCredential[]>


findCredential()

findCredential(credentialId): Promise<PasskeyCredential | null | undefined>

Defined in: packages/auth/src/Passkeys.ts:97

Parameters

credentialId

string

Returns

Promise<PasskeyCredential | null | undefined>


saveCredential()

saveCredential(credential): Promise<void>

Defined in: packages/auth/src/Passkeys.ts:98

Parameters

credential

Omit<PasskeyCredential, "id">

Returns

Promise<void>


updateCounter()

updateCounter(id, newCounter): Promise<void>

Defined in: packages/auth/src/Passkeys.ts:99

Parameters

id

number

newCounter

number

Returns

Promise<void>