This repository provides sample HTML email templates for Logto email connectors. You can use these templates as a starting point when configuring your own email service provider.
For the full Logto email template configuration guide, see the Logto email templates documentation.
The templates are provided in two forms:
- Individual HTML files in the
html-templates/directory, one for each Logto email template usage type. - A combined
email-config.jsonfile in the project root that contains the same HTML content in the format expected by Logto email connector template configuration.
If you want the quickest setup, use email-config.json directly in your connector configuration. If you want to inspect or customize the template details, open the corresponding HTML file in html-templates/.
| Usage type | HTML file | Dynamic variable |
|---|---|---|
SignIn |
html-templates/sign-in-template.html |
{{code}} |
Register |
html-templates/register-template.html |
{{code}} |
ForgotPassword |
html-templates/forgot-password-template.html |
{{code}} |
OrganizationInvitation |
html-templates/organization-invitation-template.html |
{{link}} |
Generic |
html-templates/generic-template.html |
{{code}} |
UserPermissionValidation |
html-templates/user-permission-validation-template.html |
{{code}} |
BindNewIdentifier |
html-templates/bind-new-identifier-template.html |
{{code}} |
MfaVerification |
html-templates/mfa-verification-template.html |
{{code}} |
BindMfa |
html-templates/bind-mfa-template.html |
{{code}} |
Each HTML file is a complete email template. The verification-code templates use {{code}}, while the organization invitation template uses {{link}}.
email-config.json combines the 9 HTML templates into a single JSON array. Each item follows this shape:
{
"usageType": "SignIn",
"contentType": "text/html",
"subject": "Logto SignIn Template",
"content": "<!DOCTYPE html>..."
}The content field contains the escaped HTML from the corresponding file in html-templates/.
- For a quick setup, copy entries from
email-config.jsoninto your Logto email connector template configuration. - To understand or customize a template, open the matching file in
html-templates/. - Update the logo, footer, company information, colors, subject, and copy as needed.
- Keep the required dynamic variable:
- Use
{{code}}for verification-code templates. - Use
{{link}}for organization invitation templates.
- Use
- If you edit an HTML file, update the matching
contentfield inemail-config.json.
- The sample templates use Handlebars-style variables supported by Logto email connectors.
- Do not remove the required dynamic variable for a template. Logto needs it to inject the verification code or invitation link.
- The provided Logto logo and footer assets are public assets hosted on
logto.io; you can replace them with your own brand assets.