fix: bearer token interception for direct API calls

This commit is contained in:
Bereket Engida
2024-10-09 20:22:18 +03:00
parent 1dc573bca9
commit 0e77ed316e
5 changed files with 85 additions and 28 deletions

View File

@@ -1,5 +1,6 @@
import { betterAuth } from "better-auth";
import {
bearer,
organization,
passkey,
phoneNumber,
@@ -12,6 +13,7 @@ import { resend } from "./email/resend";
const from = process.env.BETTER_AUTH_EMAIL || "delivered@resend.dev";
const to = process.env.TEST_EMAIL || "";
export const auth = betterAuth({
database: new LibsqlDialect({
url: process.env.TURSO_DATABASE_URL || "",
@@ -80,6 +82,7 @@ export const auth = betterAuth({
},
}),
passkey(),
bearer()
],
socialProviders: {
github: {