[PR #5078] [MERGED] fix(adapter): Kysely with CamelCasePlugin breaks for OIDC. #14005

Closed
opened 2026-04-13 09:15:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5078
Author: @ping-maxwell
Created: 10/4/2025
Status: Merged
Merged: 11/5/2025
Merged by: @himself65

Base: canaryHead: fix/kysely-lowercase-plugin-breaks


📝 Commits (9)

  • 1e5c79b fix(adapter): Kysely with CamelCasePlugin breaks for OIDC.
  • b002a86 chore: cleanup
  • f7da023 Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks
  • bbee513 fix: CI
  • f807e50 Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks
  • d820d55 fix: mcp
  • 29a9ec8 Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks
  • 5a939f2 Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks
  • 21e4a16 Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks

📊 Changes

8 files changed (+24 additions, -24 deletions)

View changed files

📝 packages/better-auth/src/plugins/mcp/authorize.ts (+2 -2)
📝 packages/better-auth/src/plugins/mcp/index.ts (+4 -4)
📝 packages/better-auth/src/plugins/mcp/mcp.test.ts (+4 -4)
📝 packages/better-auth/src/plugins/oidc-provider/authorize.ts (+1 -1)
📝 packages/better-auth/src/plugins/oidc-provider/index.ts (+2 -2)
📝 packages/better-auth/src/plugins/oidc-provider/oidc.test.ts (+9 -9)
📝 packages/better-auth/src/plugins/oidc-provider/schema.ts (+1 -1)
📝 packages/better-auth/src/plugins/oidc-provider/types.ts (+1 -1)

📄 Description

TLDR

Kysely using their CamelCasePlugin breaks for OIDC due to one of the fields being defined as redirectURLs, which causes an inconsistency when generating the lowercase version.

Breaking Changes ⚠️

This does require all OIDC users to run migrations in order to update the field.
And potentially required user-end code changes if they're accessing the redirectURLs. (Should change to redirectUrls)

closes: https://github.com/better-auth/better-auth/issues/4198
linear: https://linear.app/better-auth/issue/ENG-180/fix-align-oidc-redirect-url-field-with-kysely-camelcase-plugin


Summary by cubic

Renamed the OIDC client field from redirectURLs to redirectUrls to align with Kysely’s CamelCasePlugin and fix redirect URI lookups. Addresses Linear ENG-180.

  • Bug Fixes

    • Use redirectUrls consistently across schema, types, registration, and authorize flow.
    • Prevents mismatched field casing that broke redirect_uri validation with CamelCasePlugin.
  • Migration

    • Rename the stored OIDC client field/column from redirectURLs to redirectUrls in your adapter storage.
    • Update any code referencing Client.redirectURLs to Client.redirectUrls.

🔄 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/5078 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 10/4/2025 **Status:** ✅ Merged **Merged:** 11/5/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/kysely-lowercase-plugin-breaks` --- ### 📝 Commits (9) - [`1e5c79b`](https://github.com/better-auth/better-auth/commit/1e5c79b9705773e3e181748d003e11eed2a202ff) fix(adapter): Kysely with `CamelCasePlugin` breaks for OIDC. - [`b002a86`](https://github.com/better-auth/better-auth/commit/b002a860b5e8f79ca16fc0ef081c1aa2874f9189) chore: cleanup - [`f7da023`](https://github.com/better-auth/better-auth/commit/f7da02394c5c2e4e99db2e51c33ae319ae5f3814) Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks - [`bbee513`](https://github.com/better-auth/better-auth/commit/bbee513daa247f15d1e38f8aa3e4579445a56b96) fix: CI - [`f807e50`](https://github.com/better-auth/better-auth/commit/f807e503dd5012274b21fa109f8735b749c481bf) Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks - [`d820d55`](https://github.com/better-auth/better-auth/commit/d820d5510c1d9748500a8f6ac3c281d2d88d1c7e) fix: mcp - [`29a9ec8`](https://github.com/better-auth/better-auth/commit/29a9ec88874f50a997fc9d6eb21f22bc722fc342) Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks - [`5a939f2`](https://github.com/better-auth/better-auth/commit/5a939f2c7772263bca01424fbb4c3246620f9306) Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks - [`21e4a16`](https://github.com/better-auth/better-auth/commit/21e4a1665e10a6abc5a1a01d8d4236f20364a14c) Merge branch 'canary' into fix/kysely-lowercase-plugin-breaks ### 📊 Changes **8 files changed** (+24 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/mcp/authorize.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/mcp/index.ts` (+4 -4) 📝 `packages/better-auth/src/plugins/mcp/mcp.test.ts` (+4 -4) 📝 `packages/better-auth/src/plugins/oidc-provider/authorize.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/oidc-provider/index.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/oidc-provider/oidc.test.ts` (+9 -9) 📝 `packages/better-auth/src/plugins/oidc-provider/schema.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/oidc-provider/types.ts` (+1 -1) </details> ### 📄 Description ## TLDR Kysely using their CamelCasePlugin breaks for OIDC due to one of the fields being defined as `redirectURLs`, which causes an inconsistency when generating the lowercase version. ## Breaking Changes ⚠️ This does require all OIDC users to run migrations in order to update the field. And potentially required user-end code changes if they're accessing the `redirectURLs`. (Should change to `redirectUrls`) closes: https://github.com/better-auth/better-auth/issues/4198 linear: https://linear.app/better-auth/issue/ENG-180/fix-align-oidc-redirect-url-field-with-kysely-camelcase-plugin <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Renamed the OIDC client field from redirectURLs to redirectUrls to align with Kysely’s CamelCasePlugin and fix redirect URI lookups. Addresses Linear ENG-180. - **Bug Fixes** - Use redirectUrls consistently across schema, types, registration, and authorize flow. - Prevents mismatched field casing that broke redirect_uri validation with CamelCasePlugin. - **Migration** - Rename the stored OIDC client field/column from redirectURLs to redirectUrls in your adapter storage. - Update any code referencing Client.redirectURLs to Client.redirectUrls. <!-- 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-13 09:15:43 -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#14005