[PR #3341] [CLOSED] fix(oidc): use JWT plugin if enabled to sign keys with tests #13015

Closed
opened 2026-04-13 08:42:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3341
Author: @kziemski
Created: 7/11/2025
Status: Closed

Base: v1.3Head: oidc-jwt


📝 Commits (6)

  • 74272ad fix(oidc): use JWT plugin if enabled to sign keys
  • 644ffc8 test(oidc-jwt): add comprehensive tests for OIDC JWT plugin functionality
  • 7a6645d Merge branch 'v1.3' into pr/kziemski/3341-1
  • 7b71cdb feat(mcp): integrate JWT plugin for token signing and remove HMAC fallback; update grant types in OIDC metadata
  • af053ad Merge remote-tracking branch 'origin/v1.3' into pr/kziemski/3341-1
  • b62087f add docs

📊 Changes

7 files changed (+454 additions, -133 deletions)

View changed files

📝 docs/content/docs/plugins/oidc-provider.mdx (+32 -5)
📝 packages/better-auth/src/plugins/jwt/index.ts (+16 -71)
packages/better-auth/src/plugins/jwt/sign.ts (+98 -0)
📝 packages/better-auth/src/plugins/mcp/index.ts (+61 -27)
📝 packages/better-auth/src/plugins/oidc-provider/index.ts (+60 -23)
📝 packages/better-auth/src/plugins/oidc-provider/oidc.test.ts (+180 -1)
📝 packages/better-auth/src/plugins/oidc-provider/types.ts (+7 -6)

📄 Description

This is a draft PR added a test to it in a separate file oidc-jwt.test.ts
in case original pr doesn't update with a test case

With this PR, if the JWT plugin is enabled, the OIDC plugin will use it to issue valid JWT tokens, following the published JWKS keys as the metadata endpoint suggests it should.


🔄 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/3341 **Author:** [@kziemski](https://github.com/kziemski) **Created:** 7/11/2025 **Status:** ❌ Closed **Base:** `v1.3` ← **Head:** `oidc-jwt` --- ### 📝 Commits (6) - [`74272ad`](https://github.com/better-auth/better-auth/commit/74272adf55833a0d99ea5b6a29f8a95f1708d276) fix(oidc): use JWT plugin if enabled to sign keys - [`644ffc8`](https://github.com/better-auth/better-auth/commit/644ffc8f5fcb16601a461dad848e650bad6cdf1c) test(oidc-jwt): add comprehensive tests for OIDC JWT plugin functionality - [`7a6645d`](https://github.com/better-auth/better-auth/commit/7a6645d6f6ec88ba50ec22cff2d843aee590760e) Merge branch 'v1.3' into pr/kziemski/3341-1 - [`7b71cdb`](https://github.com/better-auth/better-auth/commit/7b71cdb61f27b9622f22ad4ceeeeb890a45099cc) feat(mcp): integrate JWT plugin for token signing and remove HMAC fallback; update grant types in OIDC metadata - [`af053ad`](https://github.com/better-auth/better-auth/commit/af053ad702bf3fd2e2668685ff140ffe1ee2543a) Merge remote-tracking branch 'origin/v1.3' into pr/kziemski/3341-1 - [`b62087f`](https://github.com/better-auth/better-auth/commit/b62087f1e8818de1ab75e9b83238b7eeb14ee285) add docs ### 📊 Changes **7 files changed** (+454 additions, -133 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/oidc-provider.mdx` (+32 -5) 📝 `packages/better-auth/src/plugins/jwt/index.ts` (+16 -71) ➕ `packages/better-auth/src/plugins/jwt/sign.ts` (+98 -0) 📝 `packages/better-auth/src/plugins/mcp/index.ts` (+61 -27) 📝 `packages/better-auth/src/plugins/oidc-provider/index.ts` (+60 -23) 📝 `packages/better-auth/src/plugins/oidc-provider/oidc.test.ts` (+180 -1) 📝 `packages/better-auth/src/plugins/oidc-provider/types.ts` (+7 -6) </details> ### 📄 Description This is a draft PR added a test to it in a separate file oidc-jwt.test.ts in case original pr doesn't update with a test case --- With this PR, if the JWT plugin is enabled, the OIDC plugin will use it to issue valid JWT tokens, following the published JWKS keys as the metadata endpoint suggests it should. --- <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 08:42:11 -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#13015