Fix null reference exceptions

This commit is contained in:
Jordan Dominion
2024-11-02 13:09:57 -04:00
parent ff0b1ce87d
commit 362913db3c
2 changed files with 2 additions and 2 deletions
@@ -28,7 +28,7 @@ namespace Tgstation.Server.Host.Security.OAuth
public abstract OAuthProvider Provider { get; }
/// <inheritdoc />
public OAuthGatewayStatus GatewayStatus => OAuthConfiguration.Gateway!.Value;
public OAuthGatewayStatus GatewayStatus => OAuthConfiguration.Gateway ?? OAuthGatewayStatus.Disabled;
/// <summary>
/// The <see cref="ILogger"/> for the <see cref="GenericOAuthValidator"/>.
@@ -22,7 +22,7 @@ namespace Tgstation.Server.Host.Security.OAuth
public OAuthProvider Provider => OAuthProvider.GitHub;
/// <inheritdoc />
public OAuthGatewayStatus GatewayStatus => oAuthConfiguration.Gateway!.Value;
public OAuthGatewayStatus GatewayStatus => oAuthConfiguration.Gateway ?? OAuthGatewayStatus.Disabled;
/// <summary>
/// The <see cref="IGitHubServiceFactory"/> for the <see cref="GitHubOAuthValidator"/>.