prisma ยท Prisma Docs
Prisma Auth.js (with Next.js) (/docs/guides/authentication/authjs/nextjs)
A step-by-step guide to integrating Auth.js into a Next.js application using the App Router and persisting user data in a Prisma Postgres database.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Prisma Auth.js (with Next.js) (/docs/guides/authentication/authjs/nextjs)
A step-by-step guide to integrating Auth.js into a Next.js application using the App Router and persisting user data in a Prisma Postgres database.
When To Use
Use when you need to implement a full authentication flow in a Next.js application that stores user information in a Prisma-managed database.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-workflow-guide.md | A guide explaining how to implement Auth.js authentication within a Next.js application using Prisma. | Questions about a guide explaining how to implement Auth.js authentication within a Next.js application using Prisma. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma.bash | A bash command to initialize a new Next.js application named authjs-prisma for use with Auth.js and Prisma. | Exact payloads, commands, or snippets shown in A bash command to initialize a new Next.js application named authjs-prisma for use with Auth.js and Prisma. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-2.bash | A bash command to initialize a new Next.js application named authjs-prisma using pnpm. | Exact payloads, commands, or snippets shown in A bash command to initialize a new Next.js application named authjs-prisma using pnpm. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-3.bash | A bash command to initialize a new Next.js application named authjs-prisma for use with Auth.js and Prisma. | Exact payloads, commands, or snippets shown in A bash command to initialize a new Next.js application named authjs-prisma for use with Auth.js and Prisma. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-4.bash | A bash command to initialize a new Next.js application using bunx for an Auth.js and Prisma integration. | Exact payloads, commands, or snippets shown in A bash command to initialize a new Next.js application using bunx for an Auth.js and Prisma integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-5.bash | Bash commands to navigate to the authjs-prisma directory for the Prisma Auth.js and Next.js guide. | Exact payloads, commands, or snippets shown in Bash commands to navigate to the authjs-prisma directory for the Prisma Auth.js and Next.js guide. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-6.bash | The bash command to install prisma, tsx, and postgres types as development dependencies for an Auth.js and Next.js setup. | Exact payloads, commands, or snippets shown in The bash command to install prisma, tsx, and postgres types as development dependencies for an Auth.js and Next.js se... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-7.bash | A bash command to install prisma, tsx, and postgres type definitions using pnpm for an Auth.js and Next.js setup. | Exact payloads, commands, or snippets shown in A bash command to install prisma, tsx, and postgres type definitions using pnpm for an Auth.js and Next.js setup. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-8.bash | Bash commands to install prisma, tsx, and postgres types as development dependencies for an Auth.js and Next.js setup. | Exact payloads, commands, or snippets shown in Bash commands to install prisma, tsx, and postgres types as development dependencies for an Auth.js and Next.js setup. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-9.bash | A bash command to install prisma, tsx, and postgres types using the bun package manager for an Auth.js and Next.js setup. | Exact payloads, commands, or snippets shown in A bash command to install prisma, tsx, and postgres types using the bun package manager for an Auth.js and Next.js se... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-10.bash | The bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg packages for an Auth.js integration with Next.js. | Exact payloads, commands, or snippets shown in The bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg packages for an Auth.js integration... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-11.bash | A bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg packages using pnpm for an Auth.js integration with Next.js. | Exact payloads, commands, or snippets shown in A bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg packages using pnpm for an Auth.js in... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-12.bash | Bash command to install Prisma client, PostgreSQL adapter, and dotenv dependencies for an Auth.js Next.js integration. | Exact payloads, commands, or snippets shown in Bash command to install Prisma client, PostgreSQL adapter, and dotenv dependencies for an Auth.js Next.js integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-13.bash | A bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg using the bun package manager for an Auth.js Next.js integration. | Exact payloads, commands, or snippets shown in A bash command to install the Prisma client, PostgreSQL adapter, dotenv, and pg using the bun package manager for an... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-14.bash | A bash command to initialize Prisma with a specific output directory for use in a Next.js application with Auth.js. | Exact payloads, commands, or snippets shown in A bash command to initialize Prisma with a specific output directory for use in a Next.js application with Auth.js. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-15.bash | A bash command to initialize Prisma with a specific output directory for use in a Next.js and Auth.js project. | Exact payloads, commands, or snippets shown in A bash command to initialize Prisma with a specific output directory for use in a Next.js and Auth.js project. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-16.bash | A bash command to initialize Prisma with a specific output directory for use in a Next.js application with Auth.js. | Exact payloads, commands, or snippets shown in A bash command to initialize Prisma with a specific output directory for use in a Next.js application with Auth.js. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-17.bash | A bash command to initialize Prisma with a specific output directory using bunx. | Exact payloads, commands, or snippets shown in A bash command to initialize Prisma with a specific output directory using bunx. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-18.bash | A bash command to initialize the database using npx create-db within a Prisma and Auth.js Next.js project. | Exact payloads, commands, or snippets shown in A bash command to initialize the database using npx create-db within a Prisma and Auth.js Next.js project. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-19.bash | A bash command using pnpm to execute the create-db utility for a Prisma Auth.js and Next.js setup. | Exact payloads, commands, or snippets shown in A bash command using pnpm to execute the create-db utility for a Prisma Auth.js and Next.js setup. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-20.bash | A bash command to initialize the database using yarn dlx create-db for a Prisma and Auth.js Next.js integration. | Exact payloads, commands, or snippets shown in A bash command to initialize the database using yarn dlx create-db for a Prisma and Auth.js Next.js integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-21.bash | A bash command using bunx to execute the create-db utility for a Prisma and Auth.js Next.js setup. | Exact payloads, commands, or snippets shown in A bash command using bunx to execute the create-db utility for a Prisma and Auth.js Next.js setup. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma.prisma | A Prisma schema file configured with a PostgreSQL datasource and a custom client output path for use with Auth.js in a Next.js environment. | Exact payloads, commands, or snippets shown in A Prisma schema file configured with a PostgreSQL datasource and a custom client output path for use with Auth.js in... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-2.prisma | A Prisma schema definition for the Account model used in an Auth.js integration with Next.js. | Exact payloads, commands, or snippets shown in A Prisma schema definition for the Account model used in an Auth.js integration with Next.js. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma.ts | A TypeScript configuration file demonstrating the integration of Prisma with Auth.js in a Next.js environment. | Exact payloads, commands, or snippets shown in A TypeScript configuration file demonstrating the integration of Prisma with Auth.js in a Next.js environment. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-22.bash | A bash command to initialize the database schema using Prisma migrate dev. | Exact payloads, commands, or snippets shown in A bash command to initialize the database schema using Prisma migrate dev. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-23.bash | A bash command to initialize the database schema using pnpm and Prisma migrate dev. | Exact payloads, commands, or snippets shown in A bash command to initialize the database schema using pnpm and Prisma migrate dev. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-24.bash | A bash command to initialize the database schema using Prisma Migrate for an Auth.js and Next.js integration. | Exact payloads, commands, or snippets shown in A bash command to initialize the database schema using Prisma Migrate for an Auth.js and Next.js integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-25.bash | A bash command to initialize the database schema using bunx and prisma migrate dev. | Exact payloads, commands, or snippets shown in A bash command to initialize the database schema using bunx and prisma migrate dev. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-26.bash | A bash command to generate the Prisma client for use with Auth.js in a Next.js application. | Exact payloads, commands, or snippets shown in A bash command to generate the Prisma client for use with Auth.js in a Next.js application. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-27.bash | A bash command to generate the Prisma client using pnpm dlx. | Exact payloads, commands, or snippets shown in A bash command to generate the Prisma client using pnpm dlx. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-28.bash | A bash command to generate the Prisma client using yarn dlx. | Exact payloads, commands, or snippets shown in A bash command to generate the Prisma client using yarn dlx. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-29.bash | A bash command to generate the Prisma client using bunx and the bun runtime. | Exact payloads, commands, or snippets shown in A bash command to generate the Prisma client using bunx and the bun runtime. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma.typescript | A TypeScript implementation demonstrating how to configure the Prisma adapter for Auth.js within a Next.js application. | Exact payloads, commands, or snippets shown in A TypeScript implementation demonstrating how to configure the Prisma adapter for Auth.js within a Next.js application. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-30.bash | The bash command to install the Prisma adapter and NextAuth beta package for Auth.js integration. | Exact payloads, commands, or snippets shown in The bash command to install the Prisma adapter and NextAuth beta package for Auth.js integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-31.bash | A bash command to install the Prisma adapter and NextAuth beta using pnpm. | Exact payloads, commands, or snippets shown in A bash command to install the Prisma adapter and NextAuth beta using pnpm. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-32.bash | The bash command to install the Prisma adapter and NextAuth beta package using yarn. | Exact payloads, commands, or snippets shown in The bash command to install the Prisma adapter and NextAuth beta package using yarn. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-33.bash | A bash command to install the Prisma adapter and NextAuth beta using the bun package manager. | Exact payloads, commands, or snippets shown in A bash command to install the Prisma adapter and NextAuth beta using the bun package manager. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-34.bash | A bash command to generate and copy a secret for Auth.js using the npx auth utility. | Exact payloads, commands, or snippets shown in A bash command to generate and copy a secret for Auth.js using the npx auth utility. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-35.bash | A bash command to generate and copy an authentication secret using the auth package via pnpm. | Exact payloads, commands, or snippets shown in A bash command to generate and copy an authentication secret using the auth package via pnpm. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-36.bash | A bash command to generate and copy an authentication secret using the auth package via yarn dlx. | Exact payloads, commands, or snippets shown in A bash command to generate and copy an authentication secret using the auth package via yarn dlx. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-37.bash | A bash command to generate and copy an authentication secret using bunx and the auth CLI. | Exact payloads, commands, or snippets shown in A bash command to generate and copy an authentication secret using bunx and the auth CLI. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-38.bash | A bash script defining the required environment variables for configuring Prisma with Auth.js in a Next.js application. | Exact payloads, commands, or snippets shown in A bash script defining the required environment variables for configuring Prisma with Auth.js in a Next.js application. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-39.bash | A bash script defining the required environment variables for configuring Auth.js with Prisma and Next.js. | Exact payloads, commands, or snippets shown in A bash script defining the required environment variables for configuring Auth.js with Prisma and Next.js. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-2.typescript | A TypeScript implementation of NextAuth configuration using Prisma as the adapter within a Next.js application. | Exact payloads, commands, or snippets shown in A TypeScript implementation of NextAuth configuration using Prisma as the adapter within a Next.js application. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-3.typescript | A TypeScript implementation of NextAuth configuration using Prisma adapters within a Next.js application. | Exact payloads, commands, or snippets shown in A TypeScript implementation of NextAuth configuration using Prisma adapters within a Next.js application. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-4.typescript | A TypeScript code example demonstrating how to configure NextAuth with the PrismaAdapter for a Next.js application. | Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to configure NextAuth with the PrismaAdapter for a Next.js application. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma.tsx | A TypeScript React component demonstrating how to export the auth middleware for Next.js integration. | Exact payloads, commands, or snippets shown in A TypeScript React component demonstrating how to export the auth middleware for Next.js integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-40.bash | Bash commands to create the directory structure and route files for NextAuth.js integration within a Next.js application. | Exact payloads, commands, or snippets shown in Bash commands to create the directory structure and route files for NextAuth.js integration within a Next.js applicat... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-2.tsx | A TypeScript React file defining the GET and POST route handlers for Auth.js integration within a Next.js application using Prisma. | Exact payloads, commands, or snippets shown in A TypeScript React file defining the GET and POST route handlers for Auth.js integration within a Next.js application... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-3.tsx | A TypeScript React component demonstrating the integration of Auth.js sign-in and sign-out functions within a Next.js application using Prisma. | Exact payloads, commands, or snippets shown in A TypeScript React component demonstrating the integration of Auth.js sign-in and sign-out functions within a Next.js... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-4.tsx | A TypeScript React component implementation demonstrating SignIn and SignOut functionality using Auth.js within a Next.js application. | Exact payloads, commands, or snippets shown in A TypeScript React component implementation demonstrating SignIn and SignOut functionality using Auth.js within a Nex... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-5.tsx | A TypeScript React component implementation demonstrating server actions for signIn and signOut using Auth.js in a Next.js environment. | Exact payloads, commands, or snippets shown in A TypeScript React component implementation demonstrating server actions for signIn and signOut using Auth.js in a Ne... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-6.tsx | A TypeScript React component demonstrating the integration of Auth.js with Prisma within a Next.js page. | Exact payloads, commands, or snippets shown in A TypeScript React component demonstrating the integration of Auth.js with Prisma within a Next.js page. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-7.tsx | A TypeScript React component demonstrating the integration of Auth.js with Prisma in a Next.js application using SignIn and SignOut components. | Exact payloads, commands, or snippets shown in A TypeScript React component demonstrating the integration of Auth.js with Prisma in a Next.js application using Sign... |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-8.tsx | A Next.js page component demonstrating how to retrieve and display a user session using Auth.js and Prisma. | Exact payloads, commands, or snippets shown in A Next.js page component demonstrating how to retrieve and display a user session using Auth.js and Prisma. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-9.tsx | A Next.js page component using Auth.js to retrieve a user session and fetch corresponding user data from Prisma. | Exact payloads, commands, or snippets shown in A Next.js page component using Auth.js to retrieve a user session and fetch corresponding user data from Prisma. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma.json | A JSON configuration file demonstrating the setup for Prisma with Auth.js in a Next.js environment. | Exact payloads, commands, or snippets shown in A JSON configuration file demonstrating the setup for Prisma with Auth.js in a Next.js environment. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-41.bash | The bash command used to start the development server for a Next.js application integrated with Prisma and Auth.js. | Exact payloads, commands, or snippets shown in The bash command used to start the development server for a Next.js application integrated with Prisma and Auth.js. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-42.bash | The bash command used to start the development server for a Prisma and Auth.js Next.js application. | Exact payloads, commands, or snippets shown in The bash command used to start the development server for a Prisma and Auth.js Next.js application. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-43.bash | The bash command used to start the Next.js development server for the Prisma Auth.js guide. | Exact payloads, commands, or snippets shown in The bash command used to start the Next.js development server for the Prisma Auth.js guide. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-44.bash | A bash command to run the Next.js development server using the Bun runtime for a Prisma and Auth.js integration. | Exact payloads, commands, or snippets shown in A bash command to run the Next.js development server using the Bun runtime for a Prisma and Auth.js integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-45.bash | A bash command to launch Prisma Studio for inspecting the database used in a Prisma and Auth.js Next.js integration. | Exact payloads, commands, or snippets shown in A bash command to launch Prisma Studio for inspecting the database used in a Prisma and Auth.js Next.js integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-46.bash | A bash command to launch Prisma Studio for managing database data during Auth.js integration. | Exact payloads, commands, or snippets shown in A bash command to launch Prisma Studio for managing database data during Auth.js integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-47.bash | A bash command to launch Prisma Studio for managing the database used in the Auth.js and Next.js integration. | Exact payloads, commands, or snippets shown in A bash command to launch Prisma Studio for managing the database used in the Auth.js and Next.js integration. |
examples/prisma-auth-js-with-next-docs-guides-authentication-authjs-nextjs-prisma-48.bash | A bash command to run Prisma Studio using the bunx runner within a Next.js and Auth.js environment. | Exact payloads, commands, or snippets shown in A bash command to run Prisma Studio using the bunx runner within a Next.js and Auth.js environment. |
What This Skill Covers
- Auth.js (with Next.js) (/docs/guides/authentication/authjs/nextjs)
- Main sections:
npm,pnpm,yarn,bun,npm.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://www.prisma.io/docs/guides/authentication/authjs/nextjs