You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing to express my concern about a significant compatibility issue that's blocking development and deployment for many users.
Issue Summary:
The current version of @lucia-auth/adapter-prisma@4.0.1 only supports Prisma Client versions ^4.2.0 || ^5.0.0, while the latest Prisma Client is now at v6.13.0. This creates a dependency conflict that prevents:
Installing dependencies without --legacy-peer-deps
Deploying applications on platforms like Vercel
Using the latest Prisma features and security updates
Impact:
Developers are forced to use outdated Prisma versions
Build processes fail in CI/CD environments
New projects cannot easily integrate Lucia with modern Prisma setups
Development teams lose access to Prisma v6 improvements and bug fixes
Current Workarounds:
Downgrading to Prisma v5 (losing access to newer features)
Using --legacy-peer-deps (which can mask other dependency issues)
These are temporary solutions that shouldn't be necessary
Request:
Could you please prioritize updating the Prisma adapter to support Prisma Client v6? This would greatly improve the developer experience and allow teams to use Lucia with modern Prisma installations.
If there are technical blockers preventing this update, please consider:
Publishing a timeline for v6 support
Documenting the specific compatibility requirements
Providing migration guidance for teams wanting to upgrade
Thank you for your time and for maintaining this valuable authentication library. I look forward to a resolution that allows seamless integration with current Prisma versions.
Best regards
Lucia v3 uses the Prisma Client v4/v5 API for its @lucia-auth/adapter-prisma adapter. Prisma v6 introduced breaking changes to the client API that affect the adapter.
Workaround: Use @prisma/client v6 with compatibility mode
Prisma v6 includes a compatibility layer for v5 APIs. In your schema.prisma:
generatorclient {provider="prisma-client-js"// No changes needed here — the adapter issue is at the API level}
If the adapter crashes, the issue is likely with how Prisma v6 changed PrismaClient method signatures. You can pin the adapter to use the v5-compatible API:
// Workaround: Wrap Prisma v6 client for Luciaimport{PrismaClient}from"@prisma/client";import{PrismaAdapter}from"@lucia-auth/adapter-prisma";constprisma=newPrismaClient();// This should work if Prisma v6 maintains v5 API compatibilityconstadapter=newPrismaAdapter(prisma.session,prisma.user);
If the adapter still fails
The most common Prisma v6 breaking change that affects Lucia is the removal of the $transaction interactive mode default and changes to findUnique/findFirst return types.
Option 1: Pin Prisma to v5
npm install @prisma/client@5 prisma@5
This is the safest path until Lucia officially supports v6.
Option 2: Use the Drizzle adapter instead
If you want to stay on Prisma v6, consider switching to Lucia's Drizzle adapter which doesn't have this compatibility issue:
import{DrizzlePostgreSQLAdapter}from"@lucia-auth/adapter-drizzle";import{db}from"./db";// Your Drizzle instanceimport{userTable,sessionTable}from"./schema";constadapter=newDrizzlePostgreSQLAdapter(db,sessionTable,userTable);
Option 3: Write a custom adapter
Lucia's adapter interface is minimal — just 6 methods:
This gives you full control over the Prisma v6 API calls without depending on the adapter package.
Status
As of now, there's no official Prisma v6 support in @lucia-auth/adapter-prisma. Given that Lucia v3 is in maintenance mode (the author has shifted focus), a community PR or custom adapter may be the fastest path forward.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Dear Lucia Development Team,
I'm writing to express my concern about a significant compatibility issue that's blocking development and deployment for many users.
Issue Summary:
The current version of @lucia-auth/adapter-prisma@4.0.1 only supports Prisma Client versions ^4.2.0 || ^5.0.0, while the latest Prisma Client is now at v6.13.0. This creates a dependency conflict that prevents:
Installing dependencies without --legacy-peer-deps
Deploying applications on platforms like Vercel
Using the latest Prisma features and security updates
Impact:
Developers are forced to use outdated Prisma versions
Build processes fail in CI/CD environments
New projects cannot easily integrate Lucia with modern Prisma setups
Development teams lose access to Prisma v6 improvements and bug fixes
Current Workarounds:
Downgrading to Prisma v5 (losing access to newer features)
Using --legacy-peer-deps (which can mask other dependency issues)
These are temporary solutions that shouldn't be necessary
Request:
Could you please prioritize updating the Prisma adapter to support Prisma Client v6? This would greatly improve the developer experience and allow teams to use Lucia with modern Prisma installations.
If there are technical blockers preventing this update, please consider:
Publishing a timeline for v6 support
Documenting the specific compatibility requirements
Providing migration guidance for teams wanting to upgrade
Thank you for your time and for maintaining this valuable authentication library. I look forward to a resolution that allows seamless integration with current Prisma versions.
Best regards
Jaco Thiart
All reactions