Class EmailVerificationCode
Represents a temporary verification code sent to a user's email address for email verification purposes.
public class EmailVerificationCode
- Inheritance
-
EmailVerificationCode
- Inherited Members
Remarks
Email verification codes are generated when a user registers or requests email verification. The code is sent via email and must be entered by the user to verify their email address. Codes expire after a set period and can only be used once.
Properties
Code
Gets or sets the verification code that the user must enter to verify their email.
public string Code { get; set; }
Property Value
- string
- Represents a temporary verification code sent to a user's email address for email verification purposes.
Remarks
This is typically a randomly generated alphanumeric string sent to the user via email.
Gets or sets the email address that this verification code was sent to.
public string Email { get; set; }
Property Value
- string
- Represents a temporary verification code sent to a user's email address for email verification purposes.
Remarks
This may differ from the user's current email if they are changing their email address.
ExpiresAt
Gets or sets the UTC timestamp when this verification code expires and can no longer be used.
public DateTime ExpiresAt { get; set; }
Property Value
- DateTime
- Represents a temporary verification code sent to a user's email address for email verification purposes.
Remarks
After this time, the code becomes invalid and a new code must be generated.
Id
Gets or sets the unique identifier for this verification code record.
public Guid Id { get; set; }
Property Value
- Guid
- Represents a temporary verification code sent to a user's email address for email verification purposes.
Used
Gets or sets a value indicating whether this verification code has already been used.
public bool Used { get; set; }
Property Value
- bool
- Represents a temporary verification code sent to a user's email address for email verification purposes.
Remarks
Once a code is used, it cannot be reused. This prevents replay attacks and ensures one-time use.
User
Gets or sets the user this verification code belongs to.
public User User { get; set; }
Property Value
- User
- Represents a temporary verification code sent to a user's email address for email verification purposes.
UserId
Gets or sets the unique identifier of the user this verification code belongs to.
public Guid UserId { get; set; }
Property Value
- Guid
- Represents a temporary verification code sent to a user's email address for email verification purposes.