ZH
测试版翻译

@yohangel / auth-react

1.0.0 ▾
MIT
GitHub

Better Auth 的 React 登录界面:支持双重验证的登录、注册、社交按钮和会话 Hook

代码6 个文件上下文约 468 个 token扫描通过

应用 .genpmignore 后将被注入的确切目录树。固定于

src/lib/auth-react/client.ts只读 · 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;

举报 @yohangel/auth-react

使用 GitHub 登录后才能举报包。