extension-email-verification
Support for sending an email with a link the recipient can click to prove they own the email address.
By caffeinelabs · 19,507 installs
npx skills add caffeinelabs/skills --skill extension-email-verification
Source repository · Upstream listing
Email — Verification
Email verification extension for [Caffeine AI](https://caffeine.ai?utm source=caffeine skill&utm medium=referral).
Overview
This skill adds email address verification via a click to verify link. The MixinEmailVerification handles the verification callback; verifiedEmails tracks verified addresses.
Backend
This component is for sending an email to users with a verification link which the user can click to prove they own the email address.
To check if an email address has been verified
Use the prefabricated module mo:caffeineai email verification/verifiedEmails.mo which cannot be modified.
To check whether an email is verified use the contains function. Do NOT try to track the email verification status independently by storing it against the user profile.
To handle the verification link
Use the prefabricated module mo:caffeineai email verification/verificationMixin.mo which cannot be modified.
The MixinEmailVerification handles calls to the verification link to verify an email address.
For sending users a verification email
This extension depends on the [extension email](../extension email/SKILL.md) for sending emails.
Use the sendVerificationEmail function.
It returns a SendResult which is ok if the email is sent successfully otherwise err(error) with the error text.
Each recipient receives an individual email with a specific verification link for them
The htmlBody MUST contain the placeholder text {{VERIFICATION URL}}
Example usage with endpoints for registering a user and for checking whether a user is verified.
The migration chain head:
Frontend
If there is a UI for the admin to enter the content of a verification email then indicate that the placeholder text {{VERIFICATION URL}} must be present in the email body.