inai-hono-sdk

Integrates InAI Auth into Hono applications with middleware and API routes.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/InAI-Team/inai-auth-skills --skill inai-hono-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: inai-hono-sdk
Source: https://github.com/InAI-Team/inai-auth-skills/tree/main/skills/inai-hono-sdk
Command: npx skills add https://github.com/InAI-Team/inai-auth-skills --skill inai-hono-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Integrates InAI Auth into Hono applications to secure routes and manage sessions.

Core Features & Use Cases

  • Middleware for global authentication and route protection using inaiAuthMiddleware.
  • API routes for login, register, MFA challenge, refresh, and logout via createAuthRoutes.
  • Route protection with requireAuth to enforce roles and permissions.
  • Context extension to access auth data in handlers.
  • Supports app and platform auth modes, cookie management, and automatic token refresh.

Quick Start

Install the package and wire up inaiAuthMiddleware, createAuthRoutes, and requireAuth in your Hono app to enable full authentication and RBAC.

Frequently Asked Questions about inai-hono-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add JWT authentication and RBAC middleware to a Hono API?

To add JWT authentication and RBAC middleware to a Hono API, use inaiAuthMiddleware for global protection and requireAuth to enforce specific roles and permissions on individual routes.

Does Hono support MFA challenges and automatic token refresh on edge runtimes?

Yes, Hono supports MFA challenges and automatic token refresh on edge runtimes by integrating createAuthRoutes, which provides endpoints for login, MFA, refresh, and logout alongside cookie management.

How do I access auth context data inside Hono route handlers?

You access auth context data inside Hono route handlers through context extension, which exposes authentication data directly within your handlers after the middleware validates the session.

Do I need a publishable key to verify ES256 and JWKS tokens in Hono?

Yes, you need the INAI_PUBLISHABLE_KEY environment variable to verify ES256 and JWKS tokens in Hono, ensuring secure session management and route protection via the InAI Auth integration.

Can I secure specific routes instead of applying global authentication in Hono?

Yes, you can secure specific routes instead of applying global authentication in Hono by using the requireAuth function to enforce roles and permissions on a per-route basis.

What is the best way to set up login and register API endpoints in a Hono app?

The best way to set up login and register API endpoints in a Hono app is using the createAuthRoutes function, which generates routes for authentication, MFA challenges, token refresh, and logout.