Class MfaState

Assembly: redb.Identity.Core.dll

Temporary state between password verification and MFA code entry.
Encrypted via with TTL enforcement.

public sealed class MfaState

Inheritance

Object→MfaState

Properties

IssuedAt

When this state was issued. Used for TTL enforcement.

public DateTimeOffset? IssuedAt { get; set; }

Jti

Replay-protection identifier. Unique per issued state token.

public Guid Jti { get; set; }

Methods

Available MFA methods for this user (e.g. ["totp"]).

public string[] Methods { get; set; }

OtpDestination

Masked destination for UI display (e.g. "+71234", "u"). Safe to carry client-side.

public string? OtpDestination { get; set; }

OtpExpiresAt

B3: absolute OTP expiry copied from for cheap pre-check.

public DateTimeOffset? OtpExpiresAt { get; set; }

OtpJti

B3: server-side OTP identifier (see ). The actual

public Guid? OtpJti { get; set; }

OtpMethod

Method that issued the OTP code: "sms" or "email". Null for TOTP states.

public string? OtpMethod { get; set; }

ReturnUrl

Original return URL from the authorization request.

public string? ReturnUrl { get; set; }

SetupJti

The jti of the setup token this OTP was sent for, when it was sent to a candidate destination at

public Guid? SetupJti { get; set; }

UserId

Authenticated user ID (password already verified).

public long UserId { get; set; }

Username

Username for display on MFA page.

public string? Username { get; set; }

WebAuthnChallenge

MFA-3: 32 random bytes issued at webauthn/{register|assert}/begin. The browser

public byte[]? WebAuthnChallenge { get; set; }

WebAuthnFlow

MFA-3: which WebAuthn ceremony this state belongs to: register (attestation,

public string? WebAuthnFlow { get; set; }

WebAuthnOptionsJson

MFA-3: serialized AssertionOptions JSON (or CredentialCreateOptions) issued

public string? WebAuthnOptionsJson { get; set; }