-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc(prisma): add edge compatibility section #9965
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
* import { PrismaAdapter } from "@auth/prisma-adapter" | ||
* | ||
* export const { handlers, auth, signIn, signOut, unstable_update } = NextAuth({ | ||
* adapter: PrismaAdapter(globalThis.prisma), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* import { PrismaAdapter } from "@auth/prisma-adapter" | |
* | |
* export const { handlers, auth, signIn, signOut, unstable_update } = NextAuth({ | |
* adapter: PrismaAdapter(globalThis.prisma), | |
* import { PrismaAdapter } from "@auth/prisma-adapter" | |
* import { PrismaClient } from "@prisma/client" | |
* | |
* globalThis.prisma ??= new PrismaClient() | |
* | |
* export const { handlers, auth, signIn, signOut, unstable_update } = NextAuth({ | |
* adapter: PrismaAdapter(globalThis.prisma), |
* At the moment, Prisma is still working on being fully compatible with the Vercel edge runtime. See the issue being tracked [here](https://github.com/prisma/prisma/issues/20560). There are two options to deal with this issue: | ||
* - Use the Prisma's [Accelerate plan](https://pris.ly/d/accelerate) | ||
* - Switch to the `jwt` session strategy. Below is an example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* At the moment, Prisma is still working on being fully compatible with the Vercel edge runtime. See the issue being tracked [here](https://github.com/prisma/prisma/issues/20560). There are two options to deal with this issue: | |
* - Use the Prisma's [Accelerate plan](https://pris.ly/d/accelerate) | |
* - Switch to the `jwt` session strategy. Below is an example: | |
* At the moment, Prisma is still working on being fully compatible with the Vercel edge runtime. See the issue being tracked [here](https://github.com/prisma/prisma/issues/20560), and Prisma’s announcement about edge support in early access since 5.9.0 [here](https://github.com/prisma/prisma/releases/tag/5.9.0). There are two options to deal with this issue: | |
* | |
* - Use the Prisma’s [Accelerate](https://pris.ly/d/accelerate) feature | |
* - Switch to the `jwt` session strategy | |
* | |
* Using Prisma in and edge runtime with `jwt` session strategy looks like this. |
Small tweaks otherwise lgtm! |
Shouldn't be necessary for Prisma v5.9.1 or higher anymore |
Add the edge compat section for Prisma