Log whether cookies could be reused
This commit is contained in:
parent
972493ace8
commit
312e94aaf3
1 changed files with 6 additions and 0 deletions
|
|
@ -74,6 +74,8 @@ async Task LogInAllAccounts()
|
|||
var curUserResp = await httpClient.GetAsync("/api/1/auth/user");
|
||||
if (!curUserResp.IsSuccessStatusCode)
|
||||
{
|
||||
Console.WriteLine($"Unable to use cached cookies for {account.username}. Getting new ones...");
|
||||
|
||||
string encodedUsername = HttpUtility.UrlEncode(account.username);
|
||||
string encodedPassword = HttpUtility.UrlEncode(account.password);
|
||||
|
||||
|
|
@ -116,6 +118,10 @@ async Task LogInAllAccounts()
|
|||
|
||||
curUserResp = await httpClient.GetAsync("/api/1/auth/user");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"Using cached cookies for {account.username}");
|
||||
}
|
||||
|
||||
var curUser = await curUserResp.Content.ReadFromJsonAsync<User>();
|
||||
Console.WriteLine($"Logged in as {curUser?.displayName}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue