twoFactor Skill: Implementing TOTP/OTP Two-Factor Authentication in Better Auth

twoFactor is the official Better Auth Agent Skill that explains how to configure the twoFactor plugin and twoFactorClient in an application, covering the complete 2FA lifecycle, including TOTP authenticators, email/SMS OTP, backup codes, the twoFactorRedirect login flow, trusted devices, and encrypted storage. Based on the official SKILL documentation, this article compiles installation commands, migration steps, and typical code examples. It is suitable for developers who need MFA and already use Better Auth, enabling coding assistants to generate configurations according to official practices rather than fragile single-factor approaches.

Read More
dsh-auth-gateway: Providing Authentication Gateway and Login Auditing for dsh Web

dsh-auth-gateway is an MIT-licensed Cordis gateway plugin maintained by xbzbing, designed to provide secure access control for DeepSeek Harness (dsh web). This plugin intercepts unauthenticated HTTP and WebSocket requests at the gateway layer, with core features including password authentication, TOTP two-factor authentication, session management, and comprehensive auditing. It manages sessions through in-memory tokens and HttpOnly Cookies, and implements password failure lockout, global and OTP-independent rate limiting to prevent brute-force attacks. Audit logs record login, logout, and password change events, persisted for 90 days without storing credentials. Installation requires Node >= 20, added via the `dsh plugin` command, and generates a one-time initial password on first startup.

Read More