supermemory/packages/lib/auth.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

34 lines
857 B
TypeScript

import { apiKeyClient } from "@better-auth/api-key/client"
import {
adminClient,
anonymousClient,
emailOTPClient,
genericOAuthClient,
magicLinkClient,
organizationClient,
usernameClient,
} from "better-auth/client/plugins"
import { createAuthClient } from "better-auth/react"
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_BACKEND_URL ?? "https://api.supermemory.ai",
fetchOptions: {
credentials: "include",
headers: { "X-App-Source": "nova" },
},
plugins: [
usernameClient(),
magicLinkClient(),
emailOTPClient(),
genericOAuthClient(),
apiKeyClient(),
adminClient(),
organizationClient(),
anonymousClient(),
],
})
export const signIn = authClient.signIn
export const signOut = authClient.signOut
export const useSession = authClient.useSession
export const getSession = authClient.getSession