Files
helios-evcs/apps/web/lib/auth-client.ts

11 lines
442 B
TypeScript

import { createAuthClient } from "better-auth/react";
import { adminClient, usernameClient } from "better-auth/client/plugins";
import { passkeyClient } from "@better-auth/passkey/client";
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_CSMS_URL ?? "http://localhost:3001",
plugins: [usernameClient(), adminClient(), passkeyClient()],
});
export const { signIn, signOut, signUp, useSession } = authClient;