mirror of
https://github.com/bitwarden/server.git
synced 2025-04-08 06:28:14 -05:00
recover
This commit is contained in:
parent
61a436906c
commit
a0fb1e0907
@ -220,14 +220,8 @@ namespace Bit.Core.Models.Api
|
|||||||
public string MasterPasswordHash { get; set; }
|
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]
|
[Required]
|
||||||
[StringLength(32)]
|
[StringLength(32)]
|
||||||
public string RecoveryCode { get; set; }
|
public string RecoveryCode { get; set; }
|
||||||
|
@ -474,7 +474,7 @@ namespace Bit.Core.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
user.TwoFactorProviders = null;
|
user.TwoFactorProviders = null;
|
||||||
user.TwoFactorRecoveryCode = null;
|
user.TwoFactorRecoveryCode = Guid.NewGuid().ToString("N");
|
||||||
await SaveUserAsync(user);
|
await SaveUserAsync(user);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user