+
UniGetUI authentication
+
{{title}}
+
You can now close this window and return to UniGetUI
+
+ """;
+
+ public async Task Stop()
+ {
+ try
+ {
+ if (_cts is not null) await _cts.CancelAsync();
+ _listener?.Stop();
+ }
+ catch (Exception ex)
+ {
+ Logger.Error(ex);
+ }
+ }
+
+ public void Dispose()
+ {
+ _cts?.Dispose();
+ }
+}
diff --git a/src/UniGetUI.Avalonia/Infrastructure/GitHubAuthService.cs b/src/UniGetUI.Avalonia/Infrastructure/GitHubAuthService.cs
index c2d12462b3..a99ca1392b 100644
--- a/src/UniGetUI.Avalonia/Infrastructure/GitHubAuthService.cs
+++ b/src/UniGetUI.Avalonia/Infrastructure/GitHubAuthService.cs
@@ -9,17 +9,16 @@ namespace UniGetUI.Avalonia.Infrastructure;
internal sealed class GitHubAuthService
{
+ private const string MissingClientId = "CLIENT_ID_UNSET";
+ private const string MissingClientSecret = "CLIENT_SECRET_UNSET";
+ private static readonly TimeSpan LoginTimeout = TimeSpan.FromMinutes(2);
private readonly string _gitHubClientId = Secrets.GetGitHubClientId();
+ private readonly string _gitHubClientSecret = Secrets.GetGitHubClientSecret();
+ private const string RedirectUri = "http://127.0.0.1:58642/";
private readonly GitHubClient _client;
public static event EventHandler