Attempt to fix auth

This commit is contained in:
Gabriel Brown 2024-08-08 03:03:52 -05:00
parent 4fa8f7b9dd
commit 80ab17eb05
3 changed files with 5 additions and 6 deletions

View File

@ -8,5 +8,4 @@ export default {
dbCredentials: {
url: env.DATABASE_URL,
},
tablesFilter: ["rent_portal_*"],
} satisfies Config;

View File

@ -5,6 +5,6 @@ import authConfig from "~/auth.config"
export const { handlers, signIn, signOut, auth } = NextAuth({
adapter: DrizzleAdapter(db),
session: { strategy: "jwt" },
//session: { strategy: "jwt" },
...authConfig
})

View File

@ -1,3 +1,4 @@
//import { sql } from "drizzle-orm";
import {
boolean,
timestamp,
@ -6,15 +7,14 @@ import {
primaryKey,
integer,
} from "drizzle-orm/pg-core"
import type { AdapterAccountType } from "next-auth/adapters"
import postgres from "postgres"
import { drizzle } from "drizzle-orm/postgres-js"
import type { AdapterAccountType } from "next-auth/adapters"
const connectionString = process.env.DATABASE_URL ?? "";
const pool = postgres(connectionString, { max: 1 })
export const db = drizzle(pool)
export const users = pgTable("user", {
id: text("id")
.primaryKey()