Packages

@hono/clerk-auth

3.1.1 · 7 Apr 2026MIT72.1k / weekRepositorynpmAtom feed

Your version

12 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 3.x · latest line
  2. 3.1.1

    7 Apr 2026
    • Deprecated

      Deprecate @hono/clerk-auth in favor of the official @clerk/hono package. To migrate, update your imports:

      - import { clerkMiddleware, getAuth } from '@hono/clerk-auth'
      + import { clerkMiddleware, getAuth } from '@clerk/hono'
  3. 3.1.0

    16 Jan 2026
    • Introduces machine authentication, supporting four token types: api_key, oauth_token, machine_token, and session_token. For backwards compatibility, session_token remains the default when no token type is specified. This enables machine-to-machine authentication and use cases such as API keys and OAuth integrations. Existing applications continue to work without modification.

      You can specify which token types are allowed by using the acceptsToken option in the getAuth() function. This option can be set to a specific type, an array of types, or 'any' to accept all supported tokens.

      Example usage:

      import { clerkMiddleware, getAuth } from '@hono/clerk-auth'
      import { Hono } from 'hono'
      
      const app = new Hono()
      
      app.use('*', clerkMiddleware())
      app.get('/api/protected', (c) => {
        const auth = getAuth(c, { acceptsToken: 'any' })
      
        if (!auth.isAuthenticated) {
          // do something for unauthenticated requests
        }
      
        if (authObject.tokenType === 'session_token') {
          console.log('this is session token from a user')
        } else {
          console.log('this is some other type of machine token')
          console.log('more specifically, a ' + authObject.tokenType)
        }
      })
  4. 3.0.3

    1 Aug 2025
    • Publish to JSR

  5. 3.0.2

    9 Jul 2025
    • Upgrade clerk dependencies.

  6. 3.0.1

    26 Jun 2025
    • Updated clerk dependency

  7. 3.0.0

    19 Jun 2025
    • Breaking

      Move @clerk/backend from peerDependencies to dependencies and bump to 2.x.x.

      This change ensures the package is directly available without requiring consumers to install it separately. The version bump includes the upcoming machine authentication feature while maintaining backward compatibility.

  8. 2.x
  9. 2.0.1

    9 Jun 2025
    • Add explicit MiddlewareHandler return type

  10. 2.0.0

    25 Apr 2024
    • Breaking

      Migrate to Clerk Core v2

  11. 1.x
  12. 1.0.3

    20 Apr 2024
    • Update peer dependencies so that newer validators can be installed.

  13. 1.0.2

    19 Apr 2024
    • Export esm

  14. 1.0.1

    9 Feb 2024
    • Change peer dependency to support v4.0.0

  15. 1.0.0

    27 Oct 2023
    • Breaking

      Added Clerk Middleware

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.