Fix OIDC login crash when groups claim is null #22

Merged
ryan merged 1 commits from fix/oidc-null-groups into main 2026-04-05 10:12:55 -04:00
Owner

Summary

  • Use claims.get("groups") or [] instead of claims.get("groups", []) so that an explicit null value from the OIDC provider is coerced to an empty list
  • Fixes ValueError: ldap_groups is non nullable field, but null was passed during OIDC callback

Test plan

  • Log in via OIDC with a provider that returns "groups": null in claims
  • Log in via OIDC with a provider that omits the groups claim entirely
  • Log in via OIDC with a provider that returns valid groups array

🤖 Generated with Claude Code

## Summary - Use `claims.get("groups") or []` instead of `claims.get("groups", [])` so that an explicit `null` value from the OIDC provider is coerced to an empty list - Fixes `ValueError: ldap_groups is non nullable field, but null was passed` during OIDC callback ## Test plan - [ ] Log in via OIDC with a provider that returns `"groups": null` in claims - [ ] Log in via OIDC with a provider that omits the `groups` claim entirely - [ ] Log in via OIDC with a provider that returns valid groups array 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ryan added 1 commit 2026-04-05 10:12:49 -04:00
Use `claims.get("groups") or []` instead of `claims.get("groups", [])`
so that an explicit `null` value is coerced to an empty list, preventing
a ValueError on the non-nullable ldap_groups field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ryan merged commit fa0f68e3b4 into main 2026-04-05 10:12:55 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ryan/simbarag#22