extension-email-verification
Installation
SKILL.md
Email — Verification
Email verification extension for Caffeine AI.
Overview
This skill adds email address verification via a click-to-verify link that lands on the app's own frontend. The backend mints and stores the link token (verificationTokens) and confirms it through MixinEmailVerification; verifiedEmails tracks verified addresses. The frontend renders the /verify-email page, where the recipient clicks a button to confirm.
Required Setup Checklist
All five steps are mandatory.
- mops dependencies —
mops add caffeineai-email-verificationandmops add caffeineai-email. - Two stable state fields —
verifiedEmails : VerifiedEmails.StateandverificationTokens : VerificationTokens.State, initialised in the migration chain head withVerifiedEmails.new()andVerificationTokens.new(). - Mixin invocation —
include MixinEmailVerification(verifiedEmails, verificationTokens)inmain.mo. - Sending —
EmailVerification.sendVerificationEmail(verificationTokens, fromUsername, recipients, subject, htmlBody); the body MUST contain{{VERIFICATION_URL}}. - Frontend npm package and route —
@caffeineai/email-verificationinstalled, and a public route/verify-email(reachable without signing in) that renders a button callingconfirm().
CRITICAL: the link in the email is https://<app domain>/verify-email?token=…. Without the frontend route the recipient lands on a missing page and the address is never verified.