# Sign up

## What sign-up does

Sign-up creates a Conduit user account as part of JWT authentication, which uses a returned token
for authenticated requests. Enter the account information in the sign-up form and submit it for
registration.

| If you need to… | Go to |
| --- | --- |
| Understand how sign-in, sign-up, and account settings fit together | [Authentication overview](doc:authentication-overview) |
| Create an account | [Before you start](#before-you-start) |
| Sign in to an existing account | [Sign in](doc:sign-in) |
| Update account details or log out | [Manage your settings](doc:manage-your-settings) |

## Before you start

Have the information for these three account fields ready:

| Information | Where you enter it |
| --- | --- |
| A username | **Username** |
| An email address | **Email** |
| A password | **Password** |

The form does not specify client-side required-field, pattern, minimum-length, or
maximum-length rules for these inputs. No additional configuration-driven field is part of
the sign-up form.

## Open the sign-up page

Use this procedure to reach the account-creation form.

**Prerequisites**

- You know whether you are creating a new account or using an existing one.

**Steps**

1. Open `/register`.

**Result:** The sign-up page opens with the account-creation form.

## Understand the sign-up screen

The sign-up screen is the form where you enter the account identity and password before sending
the registration request.

| What you see | Use it for |
| --- | --- |
| `Sign Up` | Identify the account-creation page. |
| **Username** | Enter the username for the account. |
| **Email** | Enter the account email address. |
| **Password** | Enter the account password. |
| **Sign up** | Send the registration request. |

Returned registration errors appear above the form.
The **Have an account?** link opens the existing-account route.

## Create the account

Use this procedure to send the three account values for registration.

**Prerequisites**

- Have a username, email address, and password ready.

**Steps**

1. In **Username**, enter the account username.
2. In **Email**, enter the account email address.
3. In **Password**, enter the account password.
4. Select **Sign up**.

   While the registration request is in progress, **Sign up** is disabled.

**Result:** The username, email address, and password are sent in the registration request.

## Use the existing-account route

Use this alternative when you already have an account and need the sign-in page instead of
creating another account.

**Prerequisites**

- You already have an account.

**Steps**

1. Select **Have an account?**.

**Result:** The login route opens.

## Handle registration errors

Use this procedure when a registration response contains error entries.

**Prerequisites**

- A registration attempt has returned an error.

**Steps**

1. Read the error entries above the form.
2. Read each returned error entry's key followed by its error text.

| What appears | What to do |
| --- | --- |
| An error entry | Read its key followed by its error text. |

Each returned error entry provides its response-specific wording.

**Result:** The returned registration error details are visible above the form.

## Know what happens next

After successful authentication, the returned token is stored and passed to the API client for
authenticated requests. When you leave the registration page, the current authentication
information is cleared.

**Result:** The authenticated session uses the returned token for subsequent API requests.
