Refactor OAuth handling and add GetAuthorizationUrl method

This commit is contained in:
Dmitri Shimanski
2025-08-22 08:51:44 +03:00
parent d96ed136d7
commit 3d724a4686
9 changed files with 61 additions and 35 deletions

View File

@@ -6,4 +6,5 @@ public interface IDiscord
{
Task<IToken?> GetTokenAsync(string code);
ISession? CreateSession();
string GetAuthorizationUrl(string state);
}

View File

@@ -9,8 +9,6 @@ public interface ISession
Task<IConnection?> GetConnectionAsync(CancellationToken cancellationToken = default);
string GetAuthorizationUrl(string state);
IToken GetToken(CancellationToken cancellationToken = default);
}

View File

@@ -8,7 +8,7 @@ public interface IUser
/// the user's id
/// </summary>
/// <seealso href="https://discord.com/developers/docs/resources/user#user-object">User-object</seealso>
public ulong Id { get; set; }
public string Id { get; set; }
/// <summary>
/// the user's username, not unique across the platform