Fix external login failure error (#563)

This commit is contained in:
Mbucari committed 2023-03-31 12:00:20 -06:00
1 parent 7e1ec47b46
commit 255e18eb5e
2 files changed
+3 -2

No files matched your search

@@ -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)
@@ -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)