Added edge case check for oauth2 service

This commit is contained in:
Marcel Baumgartner 2023-05-21 23:07:33 +02:00
parent f8fdc22bb0
commit 02cf5e99e5

View file

@ -26,7 +26,9 @@ public class OAuth2Service
var config = ConfigService.GetSection("Moonlight").GetSection("OAuth2");
Configs = config.GetSection("Providers").Get<OAuth2ProviderConfig[]>();
Configs = config.GetSection("Providers").Get<OAuth2ProviderConfig[]>()
?? Array.Empty<OAuth2ProviderConfig>();
OverrideUrl = config.GetValue<string>("OverrideUrl");
EnableOverrideUrl = config.GetValue<bool>("EnableOverrideUrl");
AppUrl = configService.GetSection("Moonlight").GetValue<string>("AppUrl");