aboutsummaryrefslogtreecommitdiffstats
path: root/app/api/auth
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-02-06 01:15:14 +0000
committerMohamedBassem <me@mbassem.com>2024-02-06 01:15:14 +0000
commitd10b76b54745eb6f4972339caa4219cb1f50ae52 (patch)
tree22cf575aeb173c8b100e8adc71620efedec2b3fc /app/api/auth
parent81531a46c368293b736bb3b12c413cfbe6e00ec4 (diff)
downloadkarakeep-d10b76b54745eb6f4972339caa4219cb1f50ae52.tar.zst
[API] Add the POST /api/v1/links api
Diffstat (limited to 'app/api/auth')
-rw-r--r--app/api/auth/[...nextauth]/route.tsx22
1 files changed, 2 insertions, 20 deletions
diff --git a/app/api/auth/[...nextauth]/route.tsx b/app/api/auth/[...nextauth]/route.tsx
index b9decb30..bfcda516 100644
--- a/app/api/auth/[...nextauth]/route.tsx
+++ b/app/api/auth/[...nextauth]/route.tsx
@@ -1,21 +1,3 @@
-import NextAuth from "next-auth"
-import { PrismaAdapter } from "@next-auth/prisma-adapter"
-import AuthentikProvider from "next-auth/providers/authentik";
-import { PrismaClient } from "@prisma/client"
-import serverConfig from "@/lib/config";
+import { authHandler } from "@/lib/auth";
-const prisma = new PrismaClient()
-
-let providers = [];
-
-if (serverConfig.auth.authentik) {
- providers.push(AuthentikProvider(serverConfig.auth.authentik));
-}
-
-const handler = NextAuth({
- // Configure one or more authentication providers
- adapter: PrismaAdapter(prisma),
- providers: providers,
-});
-
-export { handler as GET, handler as POST }
+export { authHandler as GET, authHandler as POST }