Class MfaChallengeResult

Assembly: redb.Identity.Core.dll

Result of .
On success: returns the new encrypted state (with embedded OTP) and masked destination for UI.
On failure: returns error code (e.g. "rate_limited", "delivery_failed", "method_not_configured").

public sealed class MfaChallengeResult

Inheritance

Object→MfaChallengeResult

Properties

Error

Error code on failure: "rate_limited", "delivery_failed", "method_not_configured", "no_channel".

public string? Error { get; init; }

MaskedDestination

Masked destination for UI (e.g. "+7***1234"). Null on failure.

public string? MaskedDestination { get; init; }

Method

Method that issued the challenge ("sms" or "email"). Null on failure.

public string? Method { get; init; }

MfaState

New encrypted MFA state to use for the verify step. Null on failure.

public string? MfaState { get; init; }

RetryAfterSeconds

Seconds until next challenge can be requested (rate limit).

public int? RetryAfterSeconds { get; init; }

Success

public bool Success { get; init; }

Methods

Failed(string, int?)

public static MfaChallengeResult Failed(string error, int? retryAfter = null)

Ok(string, string, string)

public static MfaChallengeResult Ok(string method, string mfaState, string maskedDestination)