Path: redb-identity/src/redb.Identity.Core/Services/MfaSetupInitiation.cs Snapshot: redb-identity, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-identity Page: https://redbase.app/src/dev-2026-12-06/redb-identity/src/redb.Identity.Core/Services/MfaSetupInitiation.cs ---- using redb.Identity.Core.Models; namespace redb.Identity.Core.Services; /// /// Pure setup data returned by . /// Captures everything the orchestrator needs to (a) hand a setup_token back to the /// client and (b) reconstruct + apply the secret on confirm — without mutating /// first. This is the B5 fix for the "two parallel setups /// race-overwrite the secret" bug. /// public sealed record MfaSetupInitiation { public required string MethodId { get; init; } /// /// Method-private secret to be persisted on confirm. For TOTP this is the encrypted /// (DataProtection-protected) base32 shared secret; for WebAuthn it would be the /// credential id payload. Null for methods that don't carry a secret (SMS/Email). /// public string? EncryptedSecret { get; init; } /// Destination such as phone or email. Null for TOTP. public string? Destination { get; init; } /// Client-facing setup data (QR URI, masked destination, errors, etc.). public required MfaSetupResult ClientResult { get; init; } }