[#7815] added checks for missing providers prop

This commit is contained in:
Gani Georgiev committed 2026-08-24 18:00:11 +03:00
1 parent da18302785
commit bc8ffed4e7
2 files changed
+64 -28

No files matched your search

+5
View File
@@ -442,6 +442,11 @@ func (c *OAuth2Config) UnmarshalJSON(b []byte) error {
return err
}
// no providers were submitted
if len(plain.Providers) == 0 {
return nil
}
if len(c.Providers) != len(plain.Providers) {
return errors.New("the length of the plain unmarshalized providers and the ones from the config doesn't match")
}