Skip to content
cccskills
FreePublished on GitHub

mfa-setup

MFA/2FA implementation: TOTP, WebAuthn/Passkeys, SMS OTP, backup codes, recovery, step-up auth.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3 stars(GitHub 3 + cccskills 0)
Works withRedis

Run score Not tested

See how to install

Files included (6)

  • SKILL.md4.9 KB
  • references/anti-patterns.md507 B
  • references/checklist.md771 B
  • references/rate-limiting.md385 B
  • references/role-rules.md437 B
  • references/schema-db.md489 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

MFA Setup — Educabot

MFA para productos Educabot (docentes, admins, alumnos). WebAuthn/Passkeys preferido, TOTP universal, SMS solo recovery.

Cuándo usar / NO usar

UsarNO usar
Agregar 2FA a backend Go o Node/TSSolo login social (OAuth) sin factor adicional
Integrar Passkeys en web (React+Vite) o mobile (RN)Apps consumer alumnos menores sin datos sensibles
Diseñar enrolamiento, verificación, recoveryMagic links como único factor (passwordless ≠ MFA)
Schema DB para credenciales MFA
Step-up auth en endpoints sensibles

Factores

FactorRecomendadoRiesgoLibrería
WebAuthn/PasskeysSí (preferido 2026+)Bajo@simplewebauthn/server, go-webauthn/webauthn
TOTP (RFC 6238)Sí (default universal)Medio (phishable)otplib (Node), pquerna/otp (Go)
SMS OTPSolo recoveryAlto (SIM swap)Twilio Verify, MessageBird
Backup codesObligatorioBajo si hash correctocustom + Argon2id

Regla Educabot: admins+docentes MFA obligatorio (mínimo TOTP/Passkey). Alumnos adultos opcional. Menores: NO SMS, solo TOTP/Passkey parental.

TOTP

  • Enrolamiento: generar secret BASE32, guardar encriptado (AES-256-GCM + KMS, nunca en claro). Generar otpauth:// URI → QR. Confirmar enrolamiento solo cuando user ingrese código válido.
  • Go: pquerna/otp — totp.Generate() con Issuer "Educabot", Period 30, DigitsSix, AlgorithmSHA1 (compatible Google Authenticator)
  • TS: otplib — authenticator.generateSecret() + keyuri() + QR via qrcode
  • Verificación: window ±1 step (30s) por drift. NO mayor.

WebAuthn / Passkeys

  • Registro: generateRegistrationOptions (rpName "Educabot", rpID "educabot.com", attestationType "none", residentKey "preferred"). Guardar challenge en sesión/Redis TTL 5min. Verificar response → guardar credentialID, publicKey, counter.
  • Login: generateAuthenticationOptions + verifyAuthenticationResponse. Actualizar counter cada uso (detecta clonado).
  • Cross-device: Passkeys sincronizan vía iCloud Keychain / Google Password Manager. Solo guardar public key + credentialID.

SMS OTP (solo recovery)

Twilio Verify para envío/verificación. Nunca factor primario. Nunca menores. Rate limit: 3 SMS/hora por número.

Backup codes

Generar 10 códigos, mostrar UNA VEZ. Guardar solo hash Argon2id. Al usar: verificar hash, marcar used_at, invalidar. Si quedan <3 → avisar para regenerar.

Recovery flow

  1. "No tengo acceso a mi 2FA" → email + 1 backup code válido
  2. Link recovery al email (TTL 15min, single-use)
  3. Confirma → desactivar MFA → forzar re-enrolamiento
  • NO preguntas secretas. Log detallado + alerta seguridad. Sin backup ni email → validación identidad manual (institución admin).

Step-up auth

Requerir MFA aunque sesión activa para: cambio email/password/phone, export datos (LGPD/GDPR), eliminación cuenta, cambios permisos, acceso PII alumnos. Middleware verifica lastMfaTimestamp contra maxAge.

Rate limiting

Rate limit en todos los endpoints MFA con Redis sliding window.

→ Read references/rate-limiting.md for límites y lockout por endpoint

Schema DB

Tablas: user_mfa, mfa_backup_codes, mfa_events.

→ Read references/schema-db.md for esquema detallado de cada tabla

Reglas por rol

Admins+docentes obligatorio, alumnos adultos opcional, menores nunca SMS.

→ Read references/role-rules.md for tabla detallada por rol con métodos y step-up maxAge

Anti-patterns

→ Read references/anti-patterns.md for lista completa (13 items)

Delegación

  • /scaffold-go — scaffold endpoints Go
  • /doc-rfc — documentar decisión técnica
  • /deploy-check — checklist pre-deploy
  • /audit-dev — auditar seguridad del flujo

Checklist

→ Read references/checklist.md for checklist completo (15 items)

  • Factor selection justified per user role (WebAuthn preferred, TOTP universal, SMS recovery-only)
  • Recovery flow designed with backup codes and email verification
  • Rate limits configured on all MFA verification endpoints (Redis sliding window)
  • Backup codes generated, shown once, and stored as Argon2id hashes
  • Step-up auth configured for sensitive operations (change email, export data, delete account)
  • TOTP secrets encrypted at rest (AES-256-GCM + KMS, never stored in plaintext)

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

See all skills by SebastianLuser

Report a problem with this skill