Purpose & Overview
Provides 2FA enrollment with QR codes, recovery codes, and verification challenges during login for elevated account security.
Installation & Setup
1
Install the package
bash
bun veap add @veap/auth-totp-plugin2
Register in lib/veap.ts (or auto via lib/plugins.gen.ts)
lib/veap.ts
typescript
// lib/veap.ts
import { Application } from "@veap/kernel";
import authTotpPlugin from "@veap/auth-totp-plugin";
export const app = Application.configure()
.withAuth()
.withPlugins([authTotpPlugin])
.create();3
Start application
bash
bun devMigrations run automatically on boot via MigrationServiceProvider.
Keep in mind
- Generates secure QR codes compatible with Google Authenticator, 1Password, Microsoft Authenticator, etc.
- Requires entering a 6-digit verification code during sign-in when two-factor authentication is active.
- Generates single-use recovery codes in case the user loses access to their authenticator device.
Dependencies
Veap Kernel
@veap/kernel (^0.1.0)
Required Veap Plugins
NPM Packages
@oslojs/otp@^1.0.0lucide-react@^1.27.0
Authors & Maintainers
Veap Core Team
Maintainer