diff --git a/src/Tgstation.Server.Host/Security/OAuth/DiscordTokenRequest.cs b/src/Tgstation.Server.Host/Security/OAuth/DiscordTokenRequest.cs
index a3ee43c704..cf477ba156 100644
--- a/src/Tgstation.Server.Host/Security/OAuth/DiscordTokenRequest.cs
+++ b/src/Tgstation.Server.Host/Security/OAuth/DiscordTokenRequest.cs
@@ -13,21 +13,15 @@ namespace Tgstation.Server.Host.Security.OAuth
///
public string GrantType { get; }
- ///
- /// The 'scope' field.
- ///
- public string Scope { get; }
-
///
/// Initializes a new instance of the .
///
/// The for the .
/// The OAuth code for the .
public DiscordTokenRequest(OAuthConfigurationBase oAuthConfiguration, string code)
- : base(oAuthConfiguration, code)
+ : base(oAuthConfiguration, code, "identify")
{
GrantType = "authorization_code";
- Scope = "identify";
}
}
}
diff --git a/src/Tgstation.Server.Host/Security/OAuth/OAuthTokenRequest.cs b/src/Tgstation.Server.Host/Security/OAuth/OAuthTokenRequest.cs
index 1db7a8f692..cad2885746 100644
--- a/src/Tgstation.Server.Host/Security/OAuth/OAuthTokenRequest.cs
+++ b/src/Tgstation.Server.Host/Security/OAuth/OAuthTokenRequest.cs
@@ -9,19 +9,26 @@ namespace Tgstation.Server.Host.Security.OAuth
class OAuthTokenRequest : OAuthConfigurationBase
{
///
- /// The OAuth code.
+ /// The OAuth code received from the browser.
///
public string Code { get; }
///
- /// Initializes a new instance of the
+ /// The scopes being requested.
+ ///
+ public string Scope { get; }
+
+ ///
+ /// Initializes a new instance of the .
///
/// The to build from.
- /// The OAuth code received from the browser.
- public OAuthTokenRequest(OAuthConfigurationBase oAuthConfiguration, string code)
+ /// The value of .
+ /// The value of
+ public OAuthTokenRequest(OAuthConfigurationBase oAuthConfiguration, string code, string scope)
: base(oAuthConfiguration)
{
Code = code ?? throw new ArgumentNullException(nameof(code));
+ Scope = scope ?? throw new ArgumentNullException(nameof(scope));
}
}
}