0
respostas

Exceção ao tentar efetuar o login

System.AggregateException: 'One or more errors occurred. (An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. For more information go to http://aka.ms/dataprotectionwarning)'

` namespace UsuariosAPI.Services { public class LoginService { private SignInManager<IdentityUser> _singInManager;

    public LoginService(SignInManager<IdentityUser<int>> singInManager)
    {
        _singInManager = singInManager;
    }

    public Result LogaUsuario(LoginRequest request)
    {
        var resultadoIdentity = _singInManager
            .PasswordSignInAsync(request.Username, request.Password,false,false);
        if (resultadoIdentity.Result.Succeeded) return Result.Ok();
        return Result.Fail("Login falhou");
    }
}

} `|