Files
documenso/apps/remix/app/lib/auth-client.ts
David Nguyen 071ce70292 wip: test
2025-01-05 15:45:51 +11:00

14 lines
414 B
TypeScript

import { twoFactor } from 'better-auth/plugins';
import { createAuthClient } from 'better-auth/react';
import { passkeyClientPlugin } from './auth/passkey-plugin/client';
// make sure to import from better-auth/react
export const authClient = createAuthClient({
baseURL: 'http://localhost:3000',
plugins: [twoFactor(), passkeyClientPlugin()],
});
export const { signIn, signOut, useSession } = authClient;