Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

feat(auth): add api key authentication middleware

Andrej Acevski9cccb87d3406
diff --git a/apps/api/src/auth.ts b/apps/api/src/auth.ts
index e40efd14c..047f73074 100644
--- a/apps/api/src/auth.ts
+++ b/apps/api/src/auth.ts
@@ -4,6 +4,7 @@ import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import {
anonymous,
+ apiKey,
createAuthMiddleware,
genericOAuth,
lastLoginMethod,
@@ -71,6 +72,7 @@ export const auth = betterAuth({
invitation: schema.invitationTable,
team: schema.teamTable,
teamMember: schema.teamMemberTable,
+ apikey: schema.apikeyTable,
},
}),
emailAndPassword: {
@@ -195,6 +197,7 @@ export const auth = betterAuth({
},
],
}),
+ apiKey(),
],
session: {
cookieCache: {