From 341db9d280c51cf1d95f56bf4e35099b71a2eea3 Mon Sep 17 00:00:00 2001 From: josh-payward <344906288+josh-payward@users.noreply.github.com> Date: Mon, 26 Oct 2026 15:27:59 -0700 Subject: [PATCH] document login origins in custom email templates --- .../authentication/customization/custom-email-template.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/embedded-wallets/authentication/customization/custom-email-template.mdx b/embedded-wallets/authentication/customization/custom-email-template.mdx index 109985c..4710359 100644 --- a/embedded-wallets/authentication/customization/custom-email-template.mdx +++ b/embedded-wallets/authentication/customization/custom-email-template.mdx @@ -29,6 +29,7 @@ The following is a list of variables that can be used when creating a custom ema - `login.device.browser`: Browser of the user receiving the login email. Example: Chrome - `login.device.os`: Operating system of the user receiving the login email. Example: MacOS - `login.timestamp`: Timestamp of when email was requested +- `login.origin`: Origin of the site where the login started, for example `https://app.example.com`. Available in both one-time passcode and email-link templates. Set only when that origin matches one of the domains in your project's allowlist. It is empty for native/mobile SDKs, for origins that are not allowlisted, and when no domain allowlist is configured. Wrap it in a conditional: `{% if login.origin %}…{% endif %}`. ## Localization @@ -147,7 +148,7 @@ When editing your template in the Magic Dashboard, you can preview how your emai ### Testing -Once a template has been created, you can use the **Send Test** button at the bottom of the customization page to send an email to the account that is currently logged in. Note that test emails will contain placeholder values for `otp` and `magic_link`. +Once a template has been created, you can use the **Send Test** button at the bottom of the customization page to send an email to the account that is currently logged in. Note that test emails will contain placeholder values for `otp`, `magic_link`, and `login.origin` (`https://example.com`). You can also view a live preview of your email in a separate browser window by selecting **Preview** from the overflow menu at the top of the page.