Skip to content

fix: tolerate string amr claims from external providers#855

Merged
wim07101993 merged 4 commits intozitadel:mainfrom
Catgroove:fix/tolerate-string-amr
Apr 10, 2026
Merged

fix: tolerate string amr claims from external providers#855
wim07101993 merged 4 commits intozitadel:mainfrom
Catgroove:fix/tolerate-string-amr

Conversation

@Catgroove
Copy link
Copy Markdown
Contributor

Summary

  • accept non-compliant amr values when providers return a single string instead of an array
  • normalize amr to []string for ID token, access token, and introspection unmarshalling without changing the public field types
  • add focused tests for string and array amr values during JSON unmarshalling

Testing

  • go test ./pkg/oidc
  • go test ./... (currently fails in unrelated existing example/server route tests in pkg/client/rp and pkg/op under Go 1.26 in this environment)

@wim07101993
Copy link
Copy Markdown
Member

Couln't we handle this in the same way we do aud, with a custom deserializer?

See Audience type for an example

@Catgroove
Copy link
Copy Markdown
Contributor Author

Couln't we handle this in the same way we do aud, with a custom deserializer?

See Audience type for an example

Adjusted!

@wim07101993 wim07101993 enabled auto-merge (squash) April 10, 2026 07:45
@wim07101993 wim07101993 removed the request for review from muhlemmer April 10, 2026 07:45
@wim07101993 wim07101993 moved this to 👀 In review in Product Management Apr 10, 2026
@wim07101993 wim07101993 merged commit 5f70eff into zitadel:main Apr 10, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Product Management Apr 10, 2026
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.47.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@wim07101993 wim07101993 self-assigned this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants