Quickstart

create-authio-app

Scaffold a working Authio integration in one command.

The fastest way to start an Authio project is the create-authio-app CLI. It prompts you for a framework and an Authio publishable key, then generates a complete starter app you can pnpm dev immediately.

Run it

npx create-authio-app my-app
# or
pnpm create authio-app my-app

You’ll be asked for a project name, framework, and your Authio publishable key. Press Enter on the key prompt to use a placeholder — you can replace it in .env.local later.

Frameworks

ChoiceWhat you get
Next.js 15middleware.ts for edge JWT verification, app/sign-in with <SignIn />, protected /dashboard Server Component, /api/me Route Handler.
ExpressBearer-token-verifying middleware on /me and /me/memberships.
HonoSame shape as Express but with Hono ergonomics.
SkipJust installs the SDKs; you bring the framework.

Skip the prompts (CI / scripting)

npx create-authio-app my-app \
  --framework nextjs \
  --publishable-key pk_live_... \
  --yes

Need a publishable key? Mint one in the dashboard at /keys/new.

What ships in the Next.js scaffold

  • middleware.tsauthMiddleware from @authio/nextjs verifies the authio_session cookie’s JWT against cached JWKS at the Edge runtime. Sub-50ms session checks.
  • app/layout.tsx — tree wrapped in AuthioProvider; every component can use useUser, useOrganizations, useActiveOrganization, useSwitchOrganization.
  • app/sign-in/page.tsx — renders <SignIn /> (passkey + magic link + social, all in one).
  • app/dashboard/page.tsx — Server Component calling await auth() server-side. Multi-org-aware (orgId may be null until the user picks one).
  • app/api/me/route.ts — same pattern, JSON response.

Source

tcast/authio_create-app on GitHub.