- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
public async Task<ActionResult> Enable2FA(string id)
{
if (string.IsNullOrEmpty(id))
{
return BadRequest("Invalid user Id");
}
User user = await userManager.FindByIdAsync(id);
if (user == null)
{
return BadRequest(USER_NOT_FOUND_MESSAGE);
}
EnableAuthenticatorModel model = await LoadSharedKeyAndQrCodeUriAsync(user);
return Ok(model);
}