Skip to content

fix: prevent prisma crash on OIDC accounts with non-standard fields#708

Open
mikimandoki wants to merge 1 commit into
oss-apps:mainfrom
mikimandoki:fix/prisma-account-unknown-fields
Open

fix: prevent prisma crash on OIDC accounts with non-standard fields#708
mikimandoki wants to merge 1 commit into
oss-apps:mainfrom
mikimandoki:fix/prisma-account-unknown-fields

Conversation

@mikimandoki

@mikimandoki mikimandoki commented Jul 20, 2026

Copy link
Copy Markdown

Description

Kanidm includes an issued_token_type field in its token response which isn't in the Prisma schema, causing a DB crash before the account could be created. Rather than adding another provider-specific case to linkAccount, this PR replaces the entire chain with a generic sanitisation pass using Prisma.AccountScalarFieldEnum as the source of truth. Any provider with non-standard fields now works without further changes.

Checklist

  • I have read CONTRIBUTING.md in its entirety
  • I have performed a self-review of my own code
  • I have added unit tests to cover my changes
  • The last commit successfully passed pre-commit checks
  • Any AI code was thoroughly reviewed by me

See #682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant