Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix adapter version
  • Loading branch information
juliusmarminge committed Jan 23, 2024
commit 54bd7f750f208e78afd7a7565d183b92b192e25d
1 change: 0 additions & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"devDependencies": {
"@auth/drizzle-adapter": "^0.3.16",
"@auth/prisma-adapter": "^1.0.16",
"@next-auth/prisma-adapter": "^1.0.7",
"@planetscale/database": "^1.14.0",
"@prisma/adapter-planetscale": "^5.6.0",
"@prisma/client": "^5.6.0",
Expand Down
2 changes: 1 addition & 1 deletion cli/src/installers/dependencyVersionMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export const dependencyVersionMap = {
// NextAuth.js
"next-auth": "^4.24.5",
"@next-auth/prisma-adapter": "^1.0.16",
"@auth/prisma-adapter": "^1.0.16",
"@auth/drizzle-adapter": "^0.3.16",

// Prisma
Expand Down
2 changes: 1 addition & 1 deletion cli/src/installers/nextAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const nextAuthInstaller: Installer = ({
const usingDrizzle = packages?.drizzle.inUse;

const deps: AvailableDependencies[] = ["next-auth"];
if (usingPrisma) deps.push("@next-auth/prisma-adapter");
if (usingPrisma) deps.push("@auth/prisma-adapter");
if (usingDrizzle) deps.push("@auth/drizzle-adapter");

addPackageDependency({
Expand Down
5 changes: 3 additions & 2 deletions cli/template/extras/src/server/auth-app/with-prisma.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { PrismaAdapter } from "@next-auth/prisma-adapter";
import { PrismaAdapter } from "@auth/prisma-adapter";
import {
getServerSession,
type DefaultSession,
type NextAuthOptions,
} from "next-auth";
import { type Adapter } from "next-auth/adapters";
import DiscordProvider from "next-auth/providers/discord";

import { env } from "~/env";
Expand Down Expand Up @@ -45,7 +46,7 @@ export const authOptions: NextAuthOptions = {
},
}),
},
adapter: PrismaAdapter(db),
adapter: PrismaAdapter(db) as Adapter,
providers: [
DiscordProvider({
clientId: env.DISCORD_CLIENT_ID,
Expand Down
5 changes: 3 additions & 2 deletions cli/template/extras/src/server/auth-pages/with-prisma.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { PrismaAdapter } from "@next-auth/prisma-adapter";
import { PrismaAdapter } from "@auth/prisma-adapter";
import { type GetServerSidePropsContext } from "next";
import {
getServerSession,
type DefaultSession,
type NextAuthOptions,
} from "next-auth";
import { type Adapter } from "next-auth/adapters";
import DiscordProvider from "next-auth/providers/discord";

import { env } from "~/env";
Expand Down Expand Up @@ -46,7 +47,7 @@ export const authOptions: NextAuthOptions = {
},
}),
},
adapter: PrismaAdapter(db),
adapter: PrismaAdapter(db) as Adapter,
providers: [
DiscordProvider({
clientId: env.DISCORD_CLIENT_ID,
Expand Down
13 changes: 0 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.