@unkey/hono
TypeScript icon, indicating that this package has built-in type declarations

1.4.16 • Public • Published

@unkey/hono

Hono.js middleware for authenticating API keys

Check out the docs at unkey.dev/docs.

Here's just an example:

import { Hono } from "hono"
import { UnkeyContext, unkey } from "@unkey/hono";

const app = new Hono<{ Variables: { unkey: UnkeyContext } }>();

app.use("*", unkey());


app.get("/somewhere", (c) => {
  // access the unkey response here to get metadata of the key etc
  const ... = c.get("unkey")

  return c.text("yo")
})
``

Readme

Keywords

Package Sidebar

Install

npm i @unkey/hono

Weekly Downloads

1,534

Version

1.4.16

License

MIT

Unpacked Size

20.8 kB

Total Files

10

Last publish

Collaborators

  • chronark
  • domeccleston
  • perkinsjr