1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00
This commit is contained in:
Kyle Spearrin 2017-06-24 16:17:38 -04:00
parent 61a436906c
commit a0fb1e0907
2 changed files with 2 additions and 8 deletions

View File

@ -220,14 +220,8 @@ namespace Bit.Core.Models.Api
public string MasterPasswordHash { get; set; }
}
public class TwoFactorRecoveryRequestModel
public class TwoFactorRecoveryRequestModel : TwoFactorEmailRequestModel
{
[Required]
[EmailAddress]
[StringLength(50)]
public string Email { get; set; }
[Required]
public string MasterPasswordHash { get; set; }
[Required]
[StringLength(32)]
public string RecoveryCode { get; set; }

View File

@ -474,7 +474,7 @@ namespace Bit.Core.Services
}
user.TwoFactorProviders = null;
user.TwoFactorRecoveryCode = null;
user.TwoFactorRecoveryCode = Guid.NewGuid().ToString("N");
await SaveUserAsync(user);
return true;