From 9897594601b92f2be79529899c5232964639ce7b Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 19 Oct 2023 08:34:51 -0400 Subject: [PATCH] Apply suggestions from code review --- .../Authentication/InteractiveLoginService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.Graph.Cli.Core/Authentication/InteractiveLoginService.cs b/src/Microsoft.Graph.Cli.Core/Authentication/InteractiveLoginService.cs index a7f5109f..d28e364a 100644 --- a/src/Microsoft.Graph.Cli.Core/Authentication/InteractiveLoginService.cs +++ b/src/Microsoft.Graph.Cli.Core/Authentication/InteractiveLoginService.cs @@ -44,14 +44,14 @@ public InteractiveLoginService(T credential, IPathUtility pathUtility) : base(pa var requestContext = new TokenRequestContext(scopes); var record = credential switch { - DeviceCodeCredential deviceCodeCred => await deviceCodeCred.AuthenticateAsync(requestContext, cancellationToken), - InteractiveBrowserCredential browserCred => await browserCred.AuthenticateAsync(requestContext, cancellationToken), + DeviceCodeCredential deviceCodeCred => await deviceCodeCred.AuthenticateAsync(requestContext, cancellationToken).ConfigureAwait(false), + InteractiveBrowserCredential browserCred => await browserCred.AuthenticateAsync(requestContext, cancellationToken).ConfigureAwait(false), // Due to the check in the constructor, this code shouldn't be reachable normally. _ => throw new InvalidOperationException("The provided credential is not supported."), }; // Request a new token to update the cache allowing incremental consent. - var _ = await credential.GetTokenAsync(requestContext, cancellationToken); + var _ = await credential.GetTokenAsync(requestContext, cancellationToken).ConfigureAwait(false); return record; }