tududi/backend/modules/oidc
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
..
auditService.js feat: Add OIDC/SSO authentication support (#1008) 2026-04-13 12:17:35 +03:00
controller.js feat: Add OIDC/SSO authentication support (#1008) 2026-04-13 12:17:35 +03:00
index.js feat: Add OIDC/SSO authentication support (#1008) 2026-04-13 12:17:35 +03:00
oidcIdentityService.js fix: correct Sequelize alias case for OIDCIdentity-User association (#1015) 2026-04-13 19:29:50 +03:00
providerConfig.js feat: Add OIDC/SSO authentication support (#1008) 2026-04-13 12:17:35 +03:00
provisioningService.js fix: resolve OIDC authentication error with existing identities (#1021) 2026-04-14 00:11:32 +03:00
routes.js feat: Add OIDC/SSO authentication support (#1008) 2026-04-13 12:17:35 +03:00
service.js feat: Add OIDC/SSO authentication support (#1008) 2026-04-13 12:17:35 +03:00
stateManager.js feat: Add OIDC/SSO authentication support (#1008) 2026-04-13 12:17:35 +03:00