Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add two-factor authentication templates to email templates in the example Kickstart file #3509

Open
RichardJECooke opened this issue Feb 10, 2025 · 2 comments

Comments

@RichardJECooke
Copy link
Contributor

The email templates at https://github.com/FusionAuth/fusionauth-example-kickstart/tree/main/fusionauth/emails do not include a template for two factor authentication.

The templates should be added to the folder above, along with updating the example Kickstart JSON file at https://github.com/FusionAuth/fusionauth-example-kickstart/blob/main/fusionauth/kickstart-development.json to use them.

@RichardJECooke
Copy link
Contributor Author

RichardJECooke commented Feb 10, 2025

The template created if you don't use Kickstart is:

  • Name: [FusionAuth Default] Two Factor Authentication
  • Default subject: Your second factor code
<p>
  To complete your login request, enter this one-time code code on the login form when prompted.
</p>
<p>
  <strong>${code}</strong>
</p>

- FusionAuth Admin
To complete your login request, enter this one-time code code on the login form when prompted.

${code}

- FusionAuth Admin

@RichardJECooke
Copy link
Contributor Author

Kickstart code:

    {
      "method": "POST",
      "url": "/api/email/template/95392509-e501-4efa-a237-5aa2617965f6",
      "body": {
        "emailTemplate": {
          "defaultFromName": "FusionAuth Development",
          "defaultSubject": "Your second factor code",
          "defaultHtmlTemplate": "@{emails/2fa.html.ftl}",
          "defaultTextTemplate": "@{emails/2fa.txt.ftl}",
          "fromEmail": "[email protected]",
          "name": "Two Factor Authentication"
        }
      }
    },
    {
      "method": "PATCH",
      "url": "/api/tenant/#{defaultTenantId}",
      "body": {
        "tenant": {
          "emailConfiguration": {},
          "multiFactorConfiguration": {
            "email": {
              "templateId": "95392509-e501-4efa-a237-5aa2617965f6"}
          }
        }
      }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant