diff --git a/SmartGlass.Cli/AuthenticateCommand.cs b/SmartGlass.Cli/AuthenticateCommand.cs index b50b645..14f5a72 100644 --- a/SmartGlass.Cli/AuthenticateCommand.cs +++ b/SmartGlass.Cli/AuthenticateCommand.cs @@ -17,7 +17,6 @@ internal class AuthenticateCommand : Command [PositionalArgument(ArgumentFlags.Required, Position = 0)] public string TokenFilePath { get; set; } -#pragma warning disable 1998 public override async Task ExecuteAsync(CancellationToken cancel) { string authUrl = AuthenticationService.GetWindowsLiveAuthenticationUrl(); @@ -34,7 +33,7 @@ public override async Task ExecuteAsync(CancellationToken cancel) AuthenticationService authService = new AuthenticationService(response); - authService.Authenticate(); + await authService.AuthenticateAsync(); using (FileStream fs = File.Open(TokenFilePath, FileMode.Create)) { @@ -50,6 +49,5 @@ public override async Task ExecuteAsync(CancellationToken cancel) Console.WriteLine($"Authentication succeeded, tokens saved to {TokenFilePath}"); return CommandResult.Success; } -#pragma warning restore 1998 } } \ No newline at end of file