diff --git a/.changeset/hono-v1.md b/.changeset/hono-v1.md new file mode 100644 index 00000000000..f6cee7597bc --- /dev/null +++ b/.changeset/hono-v1.md @@ -0,0 +1,28 @@ +--- +'@clerk/hono': major +--- + +`@clerk/hono` is now stable. This release has no breaking changes. + +## Basic usage + +```ts +import { Hono } from 'hono'; +import { clerkMiddleware, getAuth } from '@clerk/hono'; + +const app = new Hono(); + +app.use('*', clerkMiddleware()); + +app.get('/protected', c => { + const { userId } = getAuth(c); + + if (!userId) { + return c.json({ error: 'Unauthorized' }, 401); + } + + return c.json({ userId }); +}); + +export default app; +```