Install the Prisma adapter:
Install command
$ pnpm add @bolkauth/adapter-prisma @prisma/clientInstall the Prisma CLI as a development dependency:
Install command
$ pnpm add -D prismaAuth Configuration
Schema Files
The package includes schema path exports:
Use the schema file that matches your datasource provider, or copy the models into your existing prisma/schema.prisma.
Required Models
Your Prisma schema must include models compatible with:
| Model | Purpose |
|---|---|
AuthUser | Users and password/email fields. |
AuthSession | Session records keyed by token. |
AuthAccount | OAuth provider account links. |
AuthVerificationToken | Magic-link and OTP tokens. |
AuthUserMetadata | Key/value metadata for onboarding and custom data. |
Migration
For production:
Dialects
The adapter is designed for Prisma clients generated from PostgreSQL, MySQL, SQLite, or CockroachDB schemas. Make sure the DATABASE_URL and datasource provider agree.