diff --git a/src/Tgstation.Server.Host/Security/OAuth/GenericOAuthValidator.cs b/src/Tgstation.Server.Host/Security/OAuth/GenericOAuthValidator.cs index d14c461a4d..8c0d1b8b02 100644 --- a/src/Tgstation.Server.Host/Security/OAuth/GenericOAuthValidator.cs +++ b/src/Tgstation.Server.Host/Security/OAuth/GenericOAuthValidator.cs @@ -28,7 +28,7 @@ abstract class GenericOAuthValidator : IOAuthValidator public abstract OAuthProvider Provider { get; } /// - public OAuthGatewayStatus GatewayStatus => OAuthConfiguration.Gateway!.Value; + public OAuthGatewayStatus GatewayStatus => OAuthConfiguration.Gateway ?? OAuthGatewayStatus.Disabled; /// /// The for the . diff --git a/src/Tgstation.Server.Host/Security/OAuth/GitHubOAuthValidator.cs b/src/Tgstation.Server.Host/Security/OAuth/GitHubOAuthValidator.cs index e07ff4b7ed..5a967912b9 100644 --- a/src/Tgstation.Server.Host/Security/OAuth/GitHubOAuthValidator.cs +++ b/src/Tgstation.Server.Host/Security/OAuth/GitHubOAuthValidator.cs @@ -22,7 +22,7 @@ sealed class GitHubOAuthValidator : IOAuthValidator public OAuthProvider Provider => OAuthProvider.GitHub; /// - public OAuthGatewayStatus GatewayStatus => oAuthConfiguration.Gateway!.Value; + public OAuthGatewayStatus GatewayStatus => oAuthConfiguration.Gateway ?? OAuthGatewayStatus.Disabled; /// /// The for the .