feat(auth): replace TOTP with phone-first login

This commit is contained in:
2026-07-28 17:39:29 +08:00
parent e7d350ec3d
commit c7f9a4e3c9
43 changed files with 18386 additions and 882 deletions

View File

@@ -34,7 +34,7 @@ public sealed class PasswordLoginDto
/// 用户密码。
/// </summary>
[Required]
[StringLength(128, MinimumLength = 10)]
[StringLength(128, MinimumLength = 8)]
[Description("用户密码。")]
public string Password { get; set; } = string.Empty;
}
@@ -204,22 +204,6 @@ public sealed class AuthenticationResultDto
};
}
public sealed class MfaChallengeDto
{
[Required]
[StringLength(2048)]
public string ChallengeToken { get; set; } = string.Empty;
[StringLength(64)]
public string? Code { get; set; }
}
public sealed class MfaConfirmDto
{
public AuthenticationResultDto Authentication { get; init; } = default!;
public IReadOnlyList<string> RecoveryCodes { get; init; } = [];
}
public sealed class RequiredPasswordChangeDto
{
[Required]
@@ -227,6 +211,6 @@ public sealed class RequiredPasswordChangeDto
public string ChallengeToken { get; set; } = string.Empty;
[Required]
[StringLength(128, MinimumLength = 10)]
[StringLength(128, MinimumLength = 8)]
public string NewPassword { get; set; } = string.Empty;
}