# Sign in

## Overview

Sign-in authenticates your account. Enter your credentials on the login page; after a successful
sign-in, the application takes you to `/`.

| If you need to… | Go to |
|---|---|
| Prepare the information for sign-in | [Prerequisites](#prerequisites) |
| Open the sign-in page | [Open the sign-in page](#open-the-sign-in-page) |
| Identify the fields and controls | [Understand the sign-in screen](#understand-the-sign-in-screen) |
| Submit your credentials | [Submit your credentials](#submit-your-credentials) |
| Respond to a loading or rejected request | [Handle sign-in responses](#handle-sign-in-responses) |
| Continue after sign-in | [Know what happens next](#know-what-happens-next) |
| Understand how sign-in, sign-up, and settings fit together | [Authentication overview](doc:authentication-overview) |
| Create an account | [Sign up](doc:sign-up) |
| Manage your account after signing in | [Manage your settings](doc:manage-your-settings) |
| Find general error guidance | [General error messages](doc:general-error-messages) |

## Prerequisites

Have the email address and password for the account you want to sign in to. The sign-in request
uses those two values.

The page does not mark either sign-in field as required. Enter both values before selecting
**Sign in** so the request contains the credentials you intend to use.

## Open the sign-in page

The sign-in page is the `/login` route.

**Prerequisites**

- Have the account email address and password ready.

**Steps**

1. Open `/login`.

**Result:** The application opens the sign-in page.

## Understand the sign-in screen

The sign-in screen contains the `Sign In` heading, two credential fields, a registration link,
the **Sign in** control, and an area for returned errors.

| Screen item | What to use it for |
|---|---|
| **Email** | Enter the account email address. |
| **Password** | Enter the account password. |
| **Need an account?** | Open the registration page. |
| **Sign in** | Submit the entered credentials. |
| Error area | Read returned error properties. |

While the request is in progress, **Sign in** is disabled. When returned errors are available,
the error area displays one line for each error as the error key followed by its returned error
text.

## Submit your credentials

Use this procedure to send the email address and password to the sign-in service.

**Prerequisites**

- Be on `/login` with the account email address and password ready.

**Steps**

1. Enter the account email address in **Email**.
2. Enter the account password in **Password**.
3. Select **Sign in**.

**Result:** The application authenticates your account and takes you to `/` after a successful
sign-in.

## Handle sign-in responses

The response has two reader-facing branches: **Sign in** is disabled while the request
is in progress, and a rejected response leaves the page available for correction and another
attempt.

**Prerequisites**

- Have the sign-in request in progress or have received a returned error.

**Steps**

1. Use the branch that matches what is on screen:

   | If you see… | Do this |
   |---|---|
   | **Sign in** is disabled | Wait for the request to finish. |
   | An error line in the error area | Read the line and select **Sign in** again. |

**Result:** A completed request either continues to the successful landing route or leaves the
returned error text in the error area, with the error key before its returned error text.

## Know what happens next

After successful sign-in, the application takes you to `/`.

If you do not have an account, select **Need an account?** to open `/register`.

**Result:** You are at `/` after a successful sign-in, or at `/register` when you choose to create
an account.
