Attempt to fix auth
This commit is contained in:
parent
4fa8f7b9dd
commit
80ab17eb05
@ -8,5 +8,4 @@ export default {
|
|||||||
dbCredentials: {
|
dbCredentials: {
|
||||||
url: env.DATABASE_URL,
|
url: env.DATABASE_URL,
|
||||||
},
|
},
|
||||||
tablesFilter: ["rent_portal_*"],
|
|
||||||
} satisfies Config;
|
} satisfies Config;
|
||||||
|
@ -5,6 +5,6 @@ import authConfig from "~/auth.config"
|
|||||||
|
|
||||||
export const { handlers, signIn, signOut, auth } = NextAuth({
|
export const { handlers, signIn, signOut, auth } = NextAuth({
|
||||||
adapter: DrizzleAdapter(db),
|
adapter: DrizzleAdapter(db),
|
||||||
session: { strategy: "jwt" },
|
//session: { strategy: "jwt" },
|
||||||
...authConfig
|
...authConfig
|
||||||
})
|
})
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//import { sql } from "drizzle-orm";
|
||||||
import {
|
import {
|
||||||
boolean,
|
boolean,
|
||||||
timestamp,
|
timestamp,
|
||||||
@ -6,15 +7,14 @@ import {
|
|||||||
primaryKey,
|
primaryKey,
|
||||||
integer,
|
integer,
|
||||||
} from "drizzle-orm/pg-core"
|
} from "drizzle-orm/pg-core"
|
||||||
|
import type { AdapterAccountType } from "next-auth/adapters"
|
||||||
import postgres from "postgres"
|
import postgres from "postgres"
|
||||||
import { drizzle } from "drizzle-orm/postgres-js"
|
import { drizzle } from "drizzle-orm/postgres-js"
|
||||||
import type { AdapterAccountType } from "next-auth/adapters"
|
|
||||||
|
|
||||||
const connectionString = process.env.DATABASE_URL ?? "";
|
const connectionString = process.env.DATABASE_URL ?? "";
|
||||||
const pool = postgres(connectionString, { max: 1 })
|
const pool = postgres(connectionString, { max: 1 })
|
||||||
|
|
||||||
export const db = drizzle(pool)
|
export const db = drizzle(pool)
|
||||||
|
|
||||||
export const users = pgTable("user", {
|
export const users = pgTable("user", {
|
||||||
id: text("id")
|
id: text("id")
|
||||||
.primaryKey()
|
.primaryKey()
|
||||||
|
Loading…
Reference in New Issue
Block a user