1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-26 12:55:17 +01:00

2fa prem fixes

This commit is contained in:
Kyle Spearrin 2017-07-07 09:28:50 -04:00
parent 67a593c0c0
commit d3c18381f9

View File

@ -48,7 +48,7 @@ namespace Bit.Api.Controllers
[HttpPost("get-authenticator")]
public async Task<TwoFactorAuthenticatorResponseModel> GetAuthenticator([FromBody]TwoFactorRequestModel model)
{
var user = await CheckAsync(model.MasterPasswordHash, true);
var user = await CheckAsync(model.MasterPasswordHash, false);
var response = new TwoFactorAuthenticatorResponseModel(user);
return response;
}
@ -58,7 +58,7 @@ namespace Bit.Api.Controllers
public async Task<TwoFactorAuthenticatorResponseModel> PutAuthenticator(
[FromBody]UpdateTwoFactorAuthenticatorRequestModel model)
{
var user = await CheckAsync(model.MasterPasswordHash, true);
var user = await CheckAsync(model.MasterPasswordHash, false);
model.ToUser(user);
if(!await _userManager.VerifyTwoFactorTokenAsync(user, TwoFactorProviderType.Authenticator.ToString(), model.Token))