Updated auth
This commit is contained in:
@@ -3,12 +3,14 @@ import { drizzleAdapter } from "better-auth/adapters/drizzle"
|
||||
import { genericOAuth } from "better-auth/plugins"
|
||||
import { db } from "../drizzle/db"
|
||||
import { env } from "../env/server"
|
||||
import { nextCookies } from "better-auth/next-js"
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: drizzleAdapter(db, {
|
||||
provider: "pg"
|
||||
}),
|
||||
plugins: [
|
||||
nextCookies(),
|
||||
genericOAuth({
|
||||
config: [{
|
||||
providerId: "authentik",
|
||||
@@ -16,6 +18,6 @@ export const auth = betterAuth({
|
||||
clientSecret: env.AUTHENTIK_CLIENT_SECRET,
|
||||
discoveryUrl: env.AUTHENTIK_DISCOVERY_URL
|
||||
}]
|
||||
})
|
||||
}),
|
||||
]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user