Share via


TwoFactorRequest Class

Definition

The request type for the "/manage/2fa" endpoint added by MapIdentityApi<TUser>(IEndpointRouteBuilder).

public sealed class TwoFactorRequest
type TwoFactorRequest = class
Public NotInheritable Class TwoFactorRequest
Inheritance
TwoFactorRequest

Constructors

TwoFactorRequest()

Properties

Enable

An optional Boolean to enable or disable the two-factor login requirement for the authenticated user. If null or unset, the current two-factor login requirement for the user will remain unchanged.

ForgetMachine

An optional Boolean to clear the cookie "remember me flag" if present. This has no impact on non-cookie authentication schemes.

ResetRecoveryCodes

An optional Boolean to reset the RecoveryCodes to new random values if true. RecoveryCodes will be empty unless they are reset or two-factor was enabled for the first time.

ResetSharedKey

An optional Boolean to reset the SharedKey to a new random value if true. This automatically disables the two-factor login requirement for the authenticated user until it is re-enabled by a later request.

TwoFactorCode

The two-factor code derived from the SharedKey. This is only required if Enable is set to true.

Applies to