Bit.Api.Controllers.AuthController.PostTokenTwoFactor C# (CSharp) Метод

PostTokenTwoFactor() приватный Метод

private PostTokenTwoFactor ( [ model ) : Task
model [
Результат Task
        public async Task<AuthTokenResponseModel> PostTokenTwoFactor([FromBody]AuthTokenTwoFactorRequestModel model)
        {
            var result = await _signInManager.TwoFactorSignInAsync(_currentContext.User, model.Provider, model.Code, model.Device?.ToDevice());
            if(result == JwtBearerSignInResult.Success)
            {
                return new AuthTokenResponseModel(result.Token, result.User);
            }

            await Task.Delay(2000);
            throw new BadRequestException("Code is not correct. Try again.");
        }
    }