diff options
Diffstat (limited to 'apps/web/server')
| -rw-r--r-- | apps/web/server/api/client.ts | 2 | ||||
| -rw-r--r-- | apps/web/server/auth.ts | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/apps/web/server/api/client.ts b/apps/web/server/api/client.ts index b36459a2..69a8e10a 100644 --- a/apps/web/server/api/client.ts +++ b/apps/web/server/api/client.ts @@ -17,7 +17,7 @@ export async function createContextFromRequest(req: Request) { if (authorizationHeader && authorizationHeader.startsWith("Bearer ")) { const token = authorizationHeader.split(" ")[1]; try { - const user = await authenticateApiKey(token); + const user = await authenticateApiKey(token, db); return { user, db, diff --git a/apps/web/server/auth.ts b/apps/web/server/auth.ts index 3abc682f..1feeec28 100644 --- a/apps/web/server/auth.ts +++ b/apps/web/server/auth.ts @@ -108,6 +108,7 @@ const providers: Provider[] = [ return await validatePassword( credentials?.email, credentials?.password, + db, ); } catch { return null; |
