tududi/backend/tests/unit
Chris b0321b02fa
fix: resolve OIDC authentication error with existing identities (#1021)
Fixed "Cannot read properties of undefined (reading 'id')" error that occurred
when existing OIDC users attempted to log in. The issue was a case mismatch in
the Sequelize association accessor.

Changes:
- Fixed case mismatch: identity.user -> identity.User (matches association alias)
- Removed invalid username field that doesn't exist in User model
- Fixed admin role assignment to use Role model instead of User model
- Improved transaction error handling to prevent double rollbacks
- Removed unused generateUsername function

Tests:
- Added comprehensive test suite with 12 tests covering all provisioning scenarios
- All tests passing including the previously failing login scenario
2026-04-14 00:11:32 +03:00
..
middleware Add comprehensive LLM development documentation (#939) 2026-03-14 02:54:59 +02:00
models Fix Telegram notification spam with channel-level rate limiting (#951) 2026-03-19 20:26:11 +02:00
modules fix: resolve OIDC authentication error with existing identities (#1021) 2026-04-14 00:11:32 +03:00
services fix: prevent task name truncation when creating from inbox (#1020) 2026-04-13 23:14:52 +03:00
shared Add comprehensive LLM development documentation (#939) 2026-03-14 02:54:59 +02:00
utils Add comprehensive LLM development documentation (#939) 2026-03-14 02:54:59 +02:00