Skip to content

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

Merged
krokosik merged 1 commit into
oss-apps:mainfrom
mikimandoki:fix/prisma-account-unknown-fields
Aug 1, 2026
Merged

krokosik merged 1 commit into
oss-apps:mainfrom
mikimandoki:fix/prisma-account-unknown-fields

Conversation

@mikimandoki

@mikimandoki mikimandoki commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

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

@krokosik
krokosik merged commit 2ade015 into oss-apps:main Aug 1, 2026
1 check passed
@krokosik

krokosik commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Thank you and apologies for taking so long

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.

2 participants