Attempt to fix auth
This commit is contained in:
parent
4fa8f7b9dd
commit
80ab17eb05
@ -8,5 +8,4 @@ export default {
|
||||
dbCredentials: {
|
||||
url: env.DATABASE_URL,
|
||||
},
|
||||
tablesFilter: ["rent_portal_*"],
|
||||
} satisfies Config;
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user