feat(hono): add @clerk/hono package #7789
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
The community
@hono/clerk-authpackage has been the go-to for Clerk + Hono users, but as Hono's popularity grows we want to offer first-party support with faster iteration and direct issue triage.This PR adds
@clerk/hono, an official Clerk SDK for Hono that provides:clerkMiddleware()- authenticates requests and attaches auth to Hono contextgetAuth(c)- retrieves the auth object from contextverifyWebhook(c)- webhook verification via@clerk/hono/webhooksc.get('clerk')andc.get('clerkAuth')The API is identical to
@hono/clerk-authfor easy migration. Based on the community package by Vaggelis Yfantis.The package is excluded from releases for now, as we want to collaborate with the Hono team on the migration path from
@hono/clerk-authbefore publishing.Test plan
clerkMiddlewareandgetAuth