Fix external login failure error (#563)

This commit is contained in:
Mbucari 2023-03-31 12:00:20 -06:00
parent 7e1ec47b46
commit 255e18eb5e
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,8 @@ namespace LibationAvalonia.Dialogs.Login
{
var dialog = new LoginChoiceEagerDialog(_account);
if (await dialog.ShowDialogAsync() is not DialogResult.OK || string.IsNullOrWhiteSpace(dialog.Password))
if (await dialog.ShowDialogAsync() is not DialogResult.OK ||
(dialog.LoginMethod is LoginMethod.Api && string.IsNullOrWhiteSpace(dialog.Password)))
return null;
switch (dialog.LoginMethod)

View File

@ -25,7 +25,7 @@ namespace LibationWinForms.Login
{
using var dialog = new LoginChoiceEagerDialog(_account);
if (!ShowDialog(dialog) || string.IsNullOrWhiteSpace(dialog.Password))
if (!ShowDialog(dialog) || (dialog.LoginMethod is LoginMethod.Api && string.IsNullOrWhiteSpace(dialog.Password)))
return null;
switch (dialog.LoginMethod)