[PR #5812] feat(jwt): support custom adapter option for jwt #14490

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

Original Pull Request: https://github.com/better-auth/better-auth/pull/5812

State: closed
Merged: Yes


Summary by cubic

Adds a custom adapter option to the JWT plugin so you can store and manage JWKS outside the database (e.g., Redis, external services, in-memory). Default behavior stays the same.

  • New Features
    • New jwt.options.adapter with getJwks(ctx), getLatestKey(ctx), and createJwk(data, ctx).
    • Adapter methods receive GenericEndpointContext for request-aware logic.
    • Core plugin types now support an adapter override.
    • Docs updated with a “Custom Adapter” example.

Written for commit ea19399abf. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5812 **State:** closed **Merged:** Yes --- <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds a custom adapter option to the JWT plugin so you can store and manage JWKS outside the database (e.g., Redis, external services, in-memory). Default behavior stays the same. - **New Features** - New jwt.options.adapter with getJwks(ctx), getLatestKey(ctx), and createJwk(data, ctx). - Adapter methods receive GenericEndpointContext for request-aware logic. - Core plugin types now support an adapter override. - Docs updated with a “Custom Adapter” example. <sup>Written for commit ea19399abfa9fdff7242546685bbe033639e2641. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:30:08 -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#14490