# Passwordless Login Email Template

Learn when FusionAuth sends the passwordless login email, and which variables the template receives.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

FusionAuth sends this email when a user requests a passwordless login, on the hosted login pages or through the [Passwordless](https://fusionauth.io/docs/apis/passwordless.md) API. Assign the template in **Passwordless login** on the Tenants -> Your Tenant -> Identities tab. To override the template for one Application, set the template on the Applications -> Your Application -> Identities tab.

## Default Template

FusionAuth ships the following default template:

```ftl
[#setting url_escaping_charset="UTF-8"]
You have requested to log into FusionAuth using this email address. If you do not recognize this request please ignore this email.

[#if oneTimeCode??]
<p>
  Login code: ${oneTimeCode}
</p>
[#else]
<p>
  [#-- The optional 'state' map provided on the Start Passwordless API call is exposed in the template as 'state' --]
  [#assign url = "${baseUrl}/oauth2/passwordless/${code}?tenantId=${user.tenantId}" /]
  [#list state!{} as key, value][#if key != "tenantId" && value??][#assign url = url + "&" + key?url + "=" + value?url/][/#if][/#list]
  <a href="${url?html}">${url?html}</a>
</p>
[/#if]
- FusionAuth Admin
```

```ftl
[#setting url_escaping_charset="UTF-8"]
You have requested to log into FusionAuth using this email address. If you do not recognize this request please ignore this email.

[#if oneTimeCode??]
<p>
  Login code: ${oneTimeCode}
</p>
[#else]
[#-- The optional 'state' map provided on the Start Passwordless API call is exposed in the template as 'state' --]
[#assign url = "${baseUrl}/oauth2/passwordless/${code}?tenantId=${user.tenantId}" /]
[#list state!{} as key, value][#if key != "tenantId" && value??][#assign url = url + "&" + key?url + "=" + value?url/][/#if][/#list]

${url}

[/#if]
- FusionAuth Admin
```

## Replacement Variables

`application`

*   Type: `Application`
*   Available since `1.21.0`

The Application object. For field definitions, see the [Application API](https://fusionauth.io/docs/apis/applications.md).

The variable is present only when the request that sends the email identifies an Application. Check for the variable before you use it:

```ftl
[#if application??]
  ${application.name}
[/#if]
```

`baseUrl`

*   Type: `String`
*   Available since `1.68.0`

The base URL for links in the email. FusionAuth uses the Application **baseURL**, then the Tenant **baseURL**, then `http://localhost:9011`.

`code`

*   Type: `String`

The code for the [Complete a Passwordless Login](https://fusionauth.io/docs/apis/passwordless/complete-a-passwordless-login.md) API. Put the code in a login link.

`oneTimeCode`

*   Type: `String`
*   Available since `1.59.0`

The one-time code the user enters on a form, for the `FormField` login strategy. Check for the variable before you use it, as the default template does.

`state`

*   Type: `Object`

The **`state`** from the passwordless start request. The variable is present only when the request includes **`state`**.

`tenant`

*   Type: `Tenant`
*   Available since `1.18.2`

The Tenant object. For field definitions, see the [Tenant API](https://fusionauth.io/docs/apis/tenants.md).

`user`

*   Type: `User`

The User object for the recipient. For field definitions, see the [User API](https://fusionauth.io/docs/apis/users.md).

Related

[APIs Create an Email Template API API documentation for the FusionAuth Create an Email Template API. freemarker](https://fusionauth.io/docs/apis/emails/create-an-email-template.md)

[APIs Email API Learn about the APIs for creating, retrieving, updating and deleting email templates as well as sending emails to users. freemarker](https://fusionauth.io/docs/apis/emails.md)

[APIs Preview an Email Template API API documentation for the FusionAuth Preview an Email Template API. freemarker](https://fusionauth.io/docs/apis/emails/preview-an-email-template.md)

[APIs Retrieve an Email Template API API documentation for the FusionAuth Retrieve an Email Template API. freemarker](https://fusionauth.io/docs/apis/emails/retrieve-an-email-template.md)
---

## Other pages in Account

> For the full index of this section, see [Email](https://fusionauth.io/docs/llms-email.txt).

- [Email Verification Email Template](https://fusionauth.io/docs/email/template-reference/account/email-verification.md): Learn when FusionAuth sends the email that asks a user to verify an email address, and which variables the template receives.
- [Email Verified Email Template](https://fusionauth.io/docs/email/template-reference/account/email-verified.md): Learn when FusionAuth sends the email that confirms a verified email address, and which variables the template receives.
- [Forgot Password Email Template](https://fusionauth.io/docs/email/template-reference/account/forgot-password.md): Learn when FusionAuth sends the forgot password email, and which variables the template receives.
- [Registration Verification Email Template](https://fusionauth.io/docs/email/template-reference/account/registration-verification.md): Learn when FusionAuth sends the email that asks a user to verify a registration, and which variables the template receives.
- [Set Up Password Email Template](https://fusionauth.io/docs/email/template-reference/account/set-up-password.md): Learn when FusionAuth sends the email that asks a new user to set up a password, and which variables the template receives.
