Add Authentik OIDC integration (task 06)
- next-auth@beta + @auth/drizzle-adapter wired up with database sessions - src/lib/auth.ts: OIDC provider, authorized callback, signIn household-attach, getCurrentUser() - src/middleware.ts: protects all routes except /login, /s/*, /api/auth/* - src/app/api/auth/[...nextauth]/route.ts: mounts Auth.js handlers - src/app/login/page.tsx: single SSO sign-in button (server action) - Schema: users extended (name/emailVerified/image), accounts/sessions/verificationTokens added - drizzle/0001_auth_tables.sql: migration for schema changes - deploy/authentik/README.md: manual bootstrap steps for Authentik - src/lib/db.ts: pass schema to drizzle for relational query builder Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
f59753404e
commit
5da472d6ff
+2
-1
@@ -1,6 +1,7 @@
|
||||
import { drizzle } from "drizzle-orm/postgres-js";
|
||||
import postgres from "postgres";
|
||||
import * as schema from "@/modules/_core/schema";
|
||||
|
||||
const client = postgres(process.env["DATABASE_URL"]!);
|
||||
|
||||
export const db = drizzle(client);
|
||||
export const db = drizzle(client, { schema });
|
||||
|
||||
Reference in New Issue
Block a user