Skip to content

Commit

Permalink
fix: metadata should not be required
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Jul 21, 2022
1 parent 1182278 commit 05afd68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfservice/strategy/oidc/strategy_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func (s *Strategy) setMetadata(evaluated string, i *identity.Identity, m Metadat
}

metadata := gjson.Get(evaluated, string(m))
if !metadata.IsObject() {
if metadata.Exists() && !metadata.IsObject() {
return errors.WithStack(herodot.ErrInternalServerError.WithReasonf("OpenID Connect Jsonnet mapper did not return an object for key %s. Please check your Jsonnet code!", m))
}

Expand Down

0 comments on commit 05afd68

Please sign in to comment.