EN

@yohangel / auth-react

1.0.0 ▾
MIT
GitHub

React login UI for Better Auth: sign-in with 2FA, sign-up, social buttons and session hooks

Code6 filesContext~468 tokensscan passed

The exact tree that will be injected, after .genpmignore. Pinned to

src/lib/auth-react/client.tsread-only · 7145b9d
// Cliente de Better Auth para React (Next.js, Vite, Remix…). Mismo origen por defecto: si tu API vive en otro
// dominio, pon aquí su URL y añade el origen de esta app a AUTH_TRUSTED_ORIGINS en el servidor.
import { twoFactorClient } from 'better-auth/client/plugins';
import { createAuthClient } from 'better-auth/react';

export const AUTH_BASE_URL: string | undefined = undefined;

export const authClient = createAuthClient({
  ...(AUTH_BASE_URL ? { baseURL: AUTH_BASE_URL } : {}),
  plugins: [twoFactorClient()],
});

export const { useSession, signIn, signUp, signOut } = authClient;

Report @yohangel/auth-react

Sign in with GitHub to report a package.