Skip to content

Commit

Permalink
Fix minor issue with auth flow
Browse files Browse the repository at this point in the history
  • Loading branch information
dend committed Jun 8, 2024
1 parent 61caea9 commit 550659a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/OpenSpartan.Workshop/Core/UserContextManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ internal static nint GetMainWindowHandle()

internal static async Task<AuthenticationResult> InitializePublicClientApplication()
{


var storageProperties = new StorageCreationPropertiesBuilder(Configuration.CacheFileName, Configuration.AppDataDirectory).Build();

var pcaBootstrap = PublicClientApplicationBuilder
.Create(Configuration.ClientID)
.WithDefaultRedirectUri()
.WithAuthority(AadAuthorityAudience.PersonalMicrosoftAccount);

if ((bool)SettingsViewModel.Instance.UseBroker)
Expand Down Expand Up @@ -130,10 +129,10 @@ internal static async Task<AuthenticationResult> InitializePublicClientApplicati
.WithAccount(accountToLogin)
.ExecuteAsync();
}
catch (MsalClientException)
catch (MsalClientException ex)
{
// Authentication was not successsful, we have no token.
LogEngine.Log("Authentication was not successful.", LogSeverity.Error);
LogEngine.Log($"Authentication was not successful. {ex.Message}", LogSeverity.Error);
}
}

Expand Down

0 comments on commit 550659a

Please sign in to comment.