datalust / seq-api

HTTP API client for Seq
https://datalust.co/seq
Apache License 2.0
78 stars 21 forks source link

SeqApiClient is not saving any cookies #39

Closed dcherubini closed 6 years ago

dcherubini commented 6 years ago

It seems like there is a bug in the SeqApiClient where the cookies returned by the API are not being kept in the CookieContainer. While this doesn't affect any requests made using an API key, it makes the user authentication unusable.

var connection = new SeqConnection("serverUrl");
connection.Users.LoginAsync("adminUser", "adminPassword");

var apps = connection.Apps.ListAsync(); // <-- This throws an Seq.Api.Client.SeqApiException: 401 - Please log in.
dcherubini commented 6 years ago

I just realized that I'm not awaiting the call to LoginAsync... my bad.