Files
lst/app/src/pkg/auth/auth-client.ts

20 lines
452 B
TypeScript

import { createAuthClient } from "better-auth/client";
import {
inferAdditionalFields,
usernameClient,
adminClient,
apiKeyClient,
} from "better-auth/client/plugins";
import type { auth } from "./auth.js";
export const authClient = createAuthClient({
baseURL: "http://localhost:3000",
plugins: [
inferAdditionalFields<typeof auth>(),
usernameClient(),
adminClient(),
apiKeyClient(),
],
});