Try to use drizzle event though

This commit is contained in:
Jared Palmer 2023-05-22 12:14:37 -04:00
parent f14e73ac8f
commit d88eae7230
14 changed files with 1978 additions and 12 deletions

16
auth.ts
View file

@ -1,11 +1,27 @@
import NextAuth from "@auth/nextjs";
import GitHub from "@auth/nextjs/providers/github";
import { NextResponse } from "next/server";
import {
db,
users,
accounts,
sessions,
verificationTokens,
} from "./lib/db/schema";
import { DrizzleAdapterPg } from "./lib/db";
export const {
handlers: { GET, POST },
auth,
CSRF_experimental,
} = NextAuth({
adapter: DrizzleAdapterPg(db, {
accounts,
users,
sessions,
verificationTokens,
}),
// @ts-ignore
providers: [GitHub],
session: { strategy: "jwt" },