[PR #4170] [CLOSED] fix: oidc plugin schema foreign key #30835

Closed
opened 2026-04-17 21:51:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4170
Author: @himself65
Created: 8/23/2025
Status: Closed

Base: canaryHead: himself65/2025/08/23/reference


📝 Commits (1)

  • fd39e55 fix: oidc plugin schema foreign key

📊 Changes

1 file changed (+15 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/oidc-provider/schema.ts (+15 -0)

📄 Description

Fixes: https://github.com/better-auth/better-auth/issues/4162


Summary by cubic

Add foreign key references for userId in the OIDC provider schema to user.id with onDelete: "cascade". This enforces referential integrity and removes orphaned OIDC records when a user is deleted, addressing better-auth/better-auth#4162.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4170 **Author:** [@himself65](https://github.com/himself65) **Created:** 8/23/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `himself65/2025/08/23/reference` --- ### 📝 Commits (1) - [`fd39e55`](https://github.com/better-auth/better-auth/commit/fd39e55b4b8cdeb650db93203fa161a49bcb0f5f) fix: oidc plugin schema foreign key ### 📊 Changes **1 file changed** (+15 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/oidc-provider/schema.ts` (+15 -0) </details> ### 📄 Description Fixes: https://github.com/better-auth/better-auth/issues/4162 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Add foreign key references for userId in the OIDC provider schema to user.id with onDelete: "cascade". This enforces referential integrity and removes orphaned OIDC records when a user is deleted, addressing better-auth/better-auth#4162. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 21:51:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#30835