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-appYou’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
| Choice | What you get |
|---|---|
Next.js 15 | middleware.ts for edge JWT verification, app/sign-in with <SignIn />, protected /dashboard Server Component, /api/me Route Handler. |
Express | Bearer-token-verifying middleware on /me and /me/memberships. |
Hono | Same shape as Express but with Hono ergonomics. |
Skip | Just installs the SDKs; you bring the framework. |
Skip the prompts (CI / scripting)
npx create-authio-app my-app \
--framework nextjs \
--publishable-key pk_live_... \
--yesNeed a publishable key? Mint one in the dashboard at /keys/new.
What ships in the Next.js scaffold
middleware.ts—authMiddlewarefrom@authio/nextjsverifies theauthio_sessioncookie’s JWT against cached JWKS at the Edge runtime. Sub-50ms session checks.app/layout.tsx— tree wrapped inAuthioProvider; every component can useuseUser,useOrganizations,useActiveOrganization,useSwitchOrganization.app/sign-in/page.tsx— renders<SignIn />(passkey + magic link + social, all in one).app/dashboard/page.tsx— Server Component callingawait auth()server-side. Multi-org-aware (orgIdmay be null until the user picks one).app/api/me/route.ts— same pattern, JSON response.
Source
tcast/authio_create-app on GitHub.