⚡ BolkAuth

Install the core package plus the framework integration and database adapter you need.

Next.js App Router

Install command
$ pnpm add @bolkauth/core @bolkauth/nextjs @bolkauth/react

Then add one adapter:

Drizzle

Install command
$ pnpm add @bolkauth/adapter-drizzle drizzle-orm

Prisma

Install command
$ pnpm add @bolkauth/adapter-prisma @prisma/client

MongoDB

Install command
$ pnpm add @bolkauth/adapter-mongodb mongodb

CLI Setup

You can also start from the CLI wizard:

Install command
$ pnpm dlx @bolkauth/cli init

The wizard can create lib/auth.ts, app/api/auth/[...bolkauth]/route.ts, middleware.ts, and .env.example.

Requirements

RequirementNotes
Node.jsUse Node.js 18 or newer for Web Crypto support.
TypeScriptRecommended for typed auth config, hooks, and adapter contracts.
Next.jsUse the App Router integration from @bolkauth/nextjs.
DatabaseBring your own database through Drizzle, Prisma, MongoDB, or a custom adapter.

Environment Variables

Create .env.local in your app:

BOLKAUTH_SECRET=
DATABASE_URL=
NEXT_PUBLIC_APP_URL=http://localhost:3000

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

Generate a session signing secret with:

openssl rand -base64 32

On this page