[PR #4071] [MERGED] feat: jwks remote url #13413

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4071
Author: @dvanmali
Created: 8/18/2025
Status: Merged
Merged: 8/18/2025
Merged by: @Bekacru

Base: canaryHead: remoteJwks


📝 Commits (1)

📊 Changes

3 files changed (+87 additions, -1 deletions)

View changed files

📝 docs/content/docs/plugins/jwt.mdx (+19 -0)
📝 packages/better-auth/src/plugins/jwt/index.ts (+23 -0)
📝 packages/better-auth/src/plugins/jwt/jwt.test.ts (+45 -1)

📄 Description

remoteUrl option disables jwks endpoint and uses this endpoint in oAuth metadata

Partial https://github.com/better-auth/better-auth/pull/3572

Type: PATCH


Summary by cubic

Adds jwks.remoteUrl to the JWT plugin to use an external JWKS. When set, it disables the /jwks endpoint and exposes the remote URL via OIDC discovery.

  • New Features

    • jwks.remoteUrl points to a remote JWKS.
    • /jwks returns 404 when remoteUrl is set; OIDC metadata uses the remote URL.
    • keyPairConfig.alg is required with remoteUrl.
    • Docs and tests added.
  • Migration

    • If you enable jwks.remoteUrl, set keyPairConfig.alg (e.g., ES256).
    • Update any clients relying on /jwks to fetch keys from the remote URL.

🔄 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/4071 **Author:** [@dvanmali](https://github.com/dvanmali) **Created:** 8/18/2025 **Status:** ✅ Merged **Merged:** 8/18/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `remoteJwks` --- ### 📝 Commits (1) - [`104e419`](https://github.com/better-auth/better-auth/commit/104e419f7179f8f67a271cf309252a5612b890c1) feat: jwks remote url ### 📊 Changes **3 files changed** (+87 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/jwt.mdx` (+19 -0) 📝 `packages/better-auth/src/plugins/jwt/index.ts` (+23 -0) 📝 `packages/better-auth/src/plugins/jwt/jwt.test.ts` (+45 -1) </details> ### 📄 Description remoteUrl option disables jwks endpoint and uses this endpoint in oAuth metadata Partial https://github.com/better-auth/better-auth/pull/3572 Type: **PATCH** <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds jwks.remoteUrl to the JWT plugin to use an external JWKS. When set, it disables the /jwks endpoint and exposes the remote URL via OIDC discovery. - **New Features** - jwks.remoteUrl points to a remote JWKS. - /jwks returns 404 when remoteUrl is set; OIDC metadata uses the remote URL. - keyPairConfig.alg is required with remoteUrl. - Docs and tests added. - **Migration** - If you enable jwks.remoteUrl, set keyPairConfig.alg (e.g., ES256). - Update any clients relying on /jwks to fetch keys from the remote URL. <!-- 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 08:55:19 -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#13413