supermemory/packages/lib/auth.middleware.ts
dependabot[bot] bce2d0dc16
Some checks failed
Publish LiveKit SDK Python / publish (push) Has been cancelled
chore(deps): bump better-auth from 1.3.3 to 1.6.22 in /packages/lib (#1741)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dhravya <dhravya@supermemory.com>
2026-10-01 17:06:40 -07:00

26 lines
594 B
TypeScript

import { apiKeyClient } from "@better-auth/api-key/client"
import { createAuthClient } from "better-auth/client"
import {
adminClient,
anonymousClient,
emailOTPClient,
magicLinkClient,
organizationClient,
usernameClient,
} from "better-auth/client/plugins"
export const middlewareAuthClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_BACKEND_URL ?? "https://api.supermemory.ai",
fetchOptions: {
throw: true,
},
plugins: [
usernameClient(),
magicLinkClient(),
emailOTPClient(),
apiKeyClient(),
adminClient(),
organizationClient(),
anonymousClient(),
],
})