[GH-ISSUE #2407] extractable needs to be added to JWKOptions #26506

Closed
opened 2026-04-17 17:06:59 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @firatoezcan on GitHub (Apr 23, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/2407

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

jwt({
  jwks: {
    keyPairConfig: {
      alg: "RS256",
      modulusLength: 2048,
    },
  },
}),

Current vs. Expected behavior

Runtime error due to extractable missing

What version of Better Auth are you using?

latest

Provide environment information

doesnt matter

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)


Additional context

0127426a5e/packages/better-auth/src/plugins/jwt/index.ts (L20)

Originally created by @firatoezcan on GitHub (Apr 23, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/2407 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce ``` jwt({ jwks: { keyPairConfig: { alg: "RS256", modulusLength: 2048, }, }, }), ``` ### Current vs. Expected behavior Runtime error due to extractable missing ### What version of Better Auth are you using? latest ### Provide environment information ```bash doesnt matter ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript ``` ### Additional context https://github.com/better-auth/better-auth/blob/0127426a5e7df4d011e27f510a6e177561f3b618/packages/better-auth/src/plugins/jwt/index.ts#L20
GiteaMirror added the lockedenhancement labels 2026-04-17 17:06:59 -05:00
Author
Owner

@ahirner commented on GitHub (Jun 29, 2025):

Runtime error due to extractable missing

On 1.2.8, configuring anything else than the default alg gives the following error:

# SERVER_ERROR:  [JOSENotSupported: Invalid or unsupported JWK "alg" (Algorithm) Parameter value] {
  code: 'ERR_JOSE_NOT_SUPPORTED'
}
GET /api/auth/get-session 500 in 1919ms
<!-- gh-comment-id:3016799548 --> @ahirner commented on GitHub (Jun 29, 2025): > Runtime error due to extractable missing On 1.2.8, configuring anything else than the default alg gives the following error: ``` # SERVER_ERROR: [JOSENotSupported: Invalid or unsupported JWK "alg" (Algorithm) Parameter value] { code: 'ERR_JOSE_NOT_SUPPORTED' } GET /api/auth/get-session 500 in 1919ms ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#26506