first commit

This commit is contained in:
Dhananjaya99
2026-09-28 11:51:12 +05:30
commit 73056da0d5
57 changed files with 7654 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
namespace AuthHex.Models
{
public class Recovery
{
public Guid Id { get; set; }
public Guid? UserId { get; set; }
public User? User { get; set; }
public string? RecoveryReferenceNum { get; set; }
// For OTP-based recovery
public string? OTP { get; set; }
public string? OTPReferenceNum { get; set; }
// For Token-based reset (SECURE - hashed)
public string? ResetTokenHash { get; set; }
public string? ResetToken { get; set; } // Plain token (only for email, not saved)
public string Status { get; set; } = "Pending"; // Pending, Used, Expired
public bool IsUsed { get; set; } = false; // Prevent token reuse
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime ExpirationTime { get; set; } = DateTime.UtcNow.AddMinutes(15);
// Recovery type: OTP or ResetLink
public string RecoveryType { get; set; } = "OTP"; // OTP, ResetLink
}
}