mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-06 08:16:03 +00:00
- Add X-App-Source: nova header to $fetch, authClient, AutumnProvider, and raw fetch calls - Remove notify-when-deleted checkbox from account deletion dialog (emails now always sent)
32 lines
768 B
TypeScript
32 lines
768 B
TypeScript
import {
|
|
adminClient,
|
|
anonymousClient,
|
|
apiKeyClient,
|
|
emailOTPClient,
|
|
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(),
|
|
apiKeyClient(),
|
|
adminClient(),
|
|
organizationClient(),
|
|
anonymousClient(),
|
|
],
|
|
})
|
|
|
|
export const signIn = authClient.signIn
|
|
export const signOut = authClient.signOut
|
|
export const useSession = authClient.useSession
|
|
export const getSession = authClient.getSession
|