Keep OAuth2 configuration if either ID or secret is set
This is necessary to account for building up the configuration one value at time
@@ -61,7 +61,7 @@ func NewConfig(v *viper.Viper) *Config {
Address: v.GetString("address"),
}
- if v.IsSet("oauth2.client_id") && v.IsSet("oauth2.client_secret") {
+ if v.IsSet("oauth2.client_id") || v.IsSet("oauth2.client_secret") {
config.OAuth2 = &OAuth2{
ClientID: v.GetString("oauth2.client_id"),
ClientSecret: v.GetString("oauth2.client_secret"),
