Socket
Book a DemoInstallSign in
Socket

@sidebase/authjs-prisma-adapter

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sidebase/authjs-prisma-adapter

A next-auth/authjs type-compatible Prisma 6 adapter for the new `prisma-client`-provider

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
88
69.23%
Maintainers
3
Weekly downloads
 
Created
Source

@sidebase/authjs-prisma-adapter

A type-compatible NextAuth.js Prisma adapter for Prisma 6, designed for projects where the Prisma client is not located at @prisma/client.

This solves the problem with the official @next-auth/prisma-adapter, which hardcodes an import from @prisma/client. In Nuxt or custom setups (e.g. when the client lives at ~/prisma/client), that import path cannot be resolved and breaks builds.

This adapter avoids the dependency on Prisma types and lets you use your own Prisma client instance.

The adapter is primarily meant for use with @sidebase/nuxt-auth module.

Installation

npm install @sidebase/authjs-prisma-adapter
# or
pnpm add @sidebase/authjs-prisma-adapter

Usage

// server/api/auth/[...].ts
import { PrismaAdapter } from '@sidebase/authjs-prisma-adapter'
import { NuxtAuthHandler } from '#auth'

// Import your Prisma client (can live anywhere in your project)
import { prisma } from '~/prisma/client'

export default NuxtAuthHandler({
  adapter: PrismaAdapter(prisma),
  // ... other configuration
})

Why not the official adapter?

  • The official @next-auth/prisma-adapter directly imports from @prisma/client.
  • In Nuxt or monorepo setups, Prisma 6 can be generated in a custom path (e.g. ~/prisma/client).
  • That import fails, making the official adapter unusable.

This adapter re-implements the same logic from next-auth@4.21.1, but without importing @prisma/client.

API

function PrismaAdapter(prisma: PrismaClient): Adapter
  • prisma: Your own Prisma client instance.
  • Returns a NextAuth-compatible Adapter.

Compatibility

  • prisma: ^6.0.0
  • next-auth: 4.21.1

License

MIT

FAQs

Package last updated on 10 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts