[PR #4200] [MERGED] fix(oidc): allow custom schemas #5246

Closed
opened 2026-03-13 12:15:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4200
Author: @julen
Created: 8/24/2025
Status: Merged
Merged: 8/24/2025
Merged by: @Bekacru

Base: canaryHead: fix/oidc-custom-schema


📝 Commits (4)

  • 2bdc11e fix(oidc): allow custom schemas
  • 1d5ec2d fix(oidc): document schema in plugin options
  • 5703736 Merge branch 'canary' into fix/oidc-custom-schema
  • 9b96ac1 Merge branch 'canary' into fix/oidc-custom-schema

📊 Changes

3 files changed (+11 additions, -3 deletions)

View changed files

📝 docs/content/docs/plugins/oidc-provider.mdx (+3 -1)
📝 packages/better-auth/src/plugins/oidc-provider/index.ts (+2 -1)
📝 packages/better-auth/src/plugins/oidc-provider/types.ts (+6 -1)

📄 Description

This commit makes it possible for the plugin schema to be overridden s.t. custom table and field names can be used.

Fixes #4199.


Summary by cubic

Enable custom schemas for the OIDC plugin so apps can use their own table and field names. Adds a typed schema option and merges it with the default at runtime.

  • New Features
    • Added options.schema to OIDCOptions (InferOptionSchema).
    • Merged custom schema with defaults via mergeSchema(schema, options?.schema).

🔄 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/4200 **Author:** [@julen](https://github.com/julen) **Created:** 8/24/2025 **Status:** ✅ Merged **Merged:** 8/24/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/oidc-custom-schema` --- ### 📝 Commits (4) - [`2bdc11e`](https://github.com/better-auth/better-auth/commit/2bdc11e235ab249c28d1c28dfc3621777e50439e) fix(oidc): allow custom schemas - [`1d5ec2d`](https://github.com/better-auth/better-auth/commit/1d5ec2d5af9a162700b7a6c1d0d0f70fef45b629) fix(oidc): document `schema` in plugin options - [`5703736`](https://github.com/better-auth/better-auth/commit/570373609dd4ad9bf31a10f4940ee859ac8ca6ae) Merge branch 'canary' into fix/oidc-custom-schema - [`9b96ac1`](https://github.com/better-auth/better-auth/commit/9b96ac19e1e85e55e19ca78fad47d8adb0ec907e) Merge branch 'canary' into fix/oidc-custom-schema ### 📊 Changes **3 files changed** (+11 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/oidc-provider.mdx` (+3 -1) 📝 `packages/better-auth/src/plugins/oidc-provider/index.ts` (+2 -1) 📝 `packages/better-auth/src/plugins/oidc-provider/types.ts` (+6 -1) </details> ### 📄 Description This commit makes it possible for the plugin schema to be overridden s.t. custom table and field names can be used. Fixes #4199. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Enable custom schemas for the OIDC plugin so apps can use their own table and field names. Adds a typed schema option and merges it with the default at runtime. - **New Features** - Added options.schema to OIDCOptions (InferOptionSchema<typeof schema>). - Merged custom schema with defaults via mergeSchema(schema, options?.schema). <!-- 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-03-13 12:15:30 -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#5246