Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet authored Oct 19, 2023
1 parent 0a61d26 commit 9897594
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9897594

Please sign in to comment.