customer-login
The customer-login template renders the login page and the password recovery page.
Location
The customer-login template is located in the templates directory of the theme.
bash
└── theme
├── layout
├── templates
│ ...
│ ├── customer-login.json
│ ...
...Usage
It renders at /account/login and /account/recover. Without this template the store shows its built-in pages. When the store disables customer accounts, /account/login redirects to the home page. Logged in customers go to the home page.
Use the customer_login form to log in and the recover_customer_password form to send a reset email. Both forms can be on the same page.
liquid
{% form 'customer_login' %}
{{ form.errors | default_errors }}
<input type="email" name="email" value="{{ form.email }}">
<input type="password" name="password">
<button type="submit">Log in</button>
{% endform %}
{% form 'recover_customer_password' %}
{% if form.posted_successfully %}
<p>Check your email.</p>
{% endif %}
<input type="email" name="email">
<button type="submit">Reset password</button>
{% endform %}
<a href="{{ routes.account_register_url }}">Create an account</a>