choosing & FAQ
Pick the right adapter for your stack and answer common questions about persistence, scoped roles, idempotency, and migration.
Quick comparison
| Adapter | Use case | Persistence | Peer dep | Idempotent assign | Native scoped roles |
|---|---|---|---|---|---|
| Memory | Dev, testing | None | None | yes (in-memory check) | yes |
| Prisma | Prisma apps | Any DB | @prisma/client | no (throws on dup) | yes |
| Drizzle | Drizzle apps | PG/MySQL/SQLite | drizzle-orm | yes (onConflictDoNothing) | yes |
| Redis | Distributed deploys | Redis | ioredis or redis | yes (set semantics) | yes |
| HTTP | Microservice split | Remote API | None | depends on backend | yes |
All adapters are interchangeable. Engine, builder, and middleware code stays the same — migration is data movement only.
Decision tree
Are you in production?
│
├─ No → MemoryAdapter
│
└─ Yes
│
├─ Already use Prisma? → PrismaAdapter
├─ Already use Drizzle? → DrizzleAdapter
├─ Need distributed cache + multi-instance? → RedisAdapter
├─ Splitting auth across services? → HttpAdapter (consume centrally)
└─ Custom backend? → Implement Adapter (see "Custom" doc)