mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 12:27:44 +00:00
31 lines
504 B
TypeScript
31 lines
504 B
TypeScript
import { createAuthClient } from "better-auth/react";
|
|
import {
|
|
organizationClient,
|
|
passkeyClient,
|
|
twoFactorClient,
|
|
} from "better-auth/client/plugins";
|
|
|
|
export const client = createAuthClient({
|
|
plugins: [
|
|
organizationClient(),
|
|
twoFactorClient({
|
|
twoFactorPage: "/two-factor",
|
|
}),
|
|
passkeyClient(),
|
|
],
|
|
fetchOptions: {
|
|
credentials: "include",
|
|
},
|
|
});
|
|
|
|
export const {
|
|
signUp,
|
|
signIn,
|
|
signOut,
|
|
useSession,
|
|
user,
|
|
organization,
|
|
useListOrganizations,
|
|
useActiveOrganization,
|
|
} = client;
|