Class IdentityWebAuthnOptions

Assembly: redb.Identity.Core.dll

MFA-3 (WebAuthn / FIDO2 / Passkeys): Relying-Party configuration.

Crypto-binding fields are explicit and fail-fast on misconfig. RpId and Origins
participate in WebAuthn signature verification — once a credential is registered against
a given RpId, that credential is permanently bound to that RpId (the RpIdHash is part
of the signed authenticatorData). Changing RpId after deployment invalidates every
existing credential. To prevent that footgun, the validator ()
requires RpId and at least one Origin to be explicitly set; null/empty defaults are
rejected with at startup. A wrong default would
cause silent breakage on the next domain rename.


is cosmetic-only (shown in the OS authenticator UI as
"Sign in to {RpName}") and is auto-derived from the Identity issuer when unset.

public sealed class IdentityWebAuthnOptions

Inheritance

Object→IdentityWebAuthnOptions

Properties

AaguidBlocklist

Manual list of banned authenticator AAGUIDs (16-byte GUIDs in the canonical

public List<string>? AaguidBlocklist { get; set; }

Attestation

Attestation conveyance preference: none | indirect | direct |

public string Attestation { get; set; }

ChallengeCleanupInterval

Interval between automatic cleanup of expired

public TimeSpan ChallengeCleanupInterval { get; set; }

ChallengeTtlSeconds

Server-side TTL of issued challenges, in seconds. Must be ≥ TimeoutMs/1000 to give

public int ChallengeTtlSeconds { get; set; }

Enabled

Master switch. When false (default) WebAuthn registration/assertion routes are

public bool Enabled { get; set; }

Origins

Allowed origins for WebAuthn ceremonies, including scheme and port for non-default

public List<string> Origins { get; set; }

RpId

WebAuthn Relying Party ID — typically the registrable domain or a subdomain of it

public string? RpId { get; set; }

RpName

Display name shown in the OS authenticator's prompt ("Sign in to {RpName} on

public string? RpName { get; set; }

TimeoutMs

Browser-side ceremony timeout in milliseconds. Authenticator will cancel after this

public int TimeoutMs { get; set; }

UseFidoMetadataService

Whether to fetch the FIDO Metadata Service (MDS3) on startup for AAGUID lookups

public bool UseFidoMetadataService { get; set; }

UserVerification

User-verification requirement: required | preferred | discouraged.

public string UserVerification { get; set; }

Methods

Validate()

Throws if required fields are unset or invalid.

public void Validate()