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/core/core/server";
import authTotpPlugin from "@veap/auth-totp-plugin";
export const app = Application.configure()
.withAuth()
.withPlugins([authTotpPlugin])
.create();3
Run database migrations
bash
bun run veap migrateKeep 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 Core
@veap/core (^0.1.0)
Required Veap Plugins
NPM Packages
- @oslojs/otp@^1.0.0
- lucide-react@^1.27.0
Authors & Maintainers
Veap Core Team
Maintainer
Specifications
- License
- MIT
- Type
- plugin
- Status
- official
- Repository
- GitHub →
- Issues
- Report issue →