> ## Documentation index
> Fetch the complete documentation index at: https://haarness.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign in and secure your account

Open **Sign in**, enter your email and choose **Continue with email**. Or choose **Continue with Google** or
**Continue with Apple**. Both are optional; a Haarness account does not need a Google account, an Apple ID or a
password. One account can sign in all three ways: see [Add or remove a way to sign in](#add-or-remove-a-way-to-sign-in).
Once you are signed in, you can also add a [passkey](#sign-in-with-a-passkey).

## Sign in with an email link or code

After **Continue with email**, Haarness emails you a sign-in link and a 6-digit code:

- **Open the link** on the same computer and browser: you are signed in at once, and the page that asked moves on
  by itself.
- **Or type the code** on the page that asked. This is the quickest way when the email is on your phone and you are
  signing in on a computer. The code also appears in the email's subject line.

If you open the link on another device or browser, Haarness shows which account the link is for and asks before
signing in there. Continue only if you asked for the link.

The link and code work once and expire after 30 minutes. After five wrong codes, use the link or ask for a new
email. **Resend** sends another email after 30 seconds: the link in any of the emails still works, but only the
newest email's code does.

## Create an account

Enter your email and choose **Continue with email**. If there is no account for the address yet, the email
confirms it and creates your account: open the link or type the code. There is no password to choose. Your account
is created only after you open the link or enter the code.

If the address already signs in with Google or Apple, the email tells you to choose **Continue with Google** or
**Continue with Apple** instead. Haarness never merges two accounts because they share an address.

## Sign in with Google or Apple

Choose **Continue with Google** or **Continue with Apple** and confirm with the provider. The first time, this
creates your Haarness account; after that it signs you in. Haarness never sees your Google or Apple password.

With Apple you may choose **Hide My Email**. Apple then gives Haarness a private relay address
(`…@privaterelay.appleid.com`) and forwards Haarness's emails, such as sign-in codes and receipts, to your real
inbox. Settings shows that address with a **Hidden email** label.

**When the address already has an account.** If you continue with Google or Apple for the first time and the
address it confirms already belongs to a Haarness account, Haarness does not create a second account. The sign-in
page shows **You already have an account** and the ways that account signs in. Sign in to it once, in the same
browser, and Google or Apple is connected to it: from then on either one works. If you would rather keep them
apart, choose **Create a separate account instead**. The choice waits 15 minutes.

## Add or remove a way to sign in

**Settings → Profile → Sign-in methods** lists how your account signs in: Google, Apple, email and your passkeys, with
the address of each and when it was last used. Keep at least two, so losing access to one never locks you out.

- **Connect Google** or **Connect Apple** opens the provider once; confirm there and you are back in Settings with
  it connected. A Google account or Apple ID that already signs in to another Haarness account cannot be
  connected: sign in with it and remove it there (or delete that account) first.
- **Remove** stops a provider from signing you in. Your last way in cannot be removed, and with two-factor
  authentication on, removing asks for a current code. Removing Apple also withdraws Haarness from your Apple ID's
  **Sign in with Apple** list.
- **Email** is there when your address has email sign-in: links and codes, and a password once you choose one.
  An account made with Google or Apple can add it with **Set up**.

Haarness emails you whenever a way to sign in is connected or removed.

## Sign in with a passkey

A passkey signs you in with your face, fingerprint or screen lock, with nothing to type. Your device or password
manager keeps it (iCloud Keychain, Google Password Manager, Windows Hello, 1Password and others), and it works only on
haarness.ai, so a look-alike site cannot use it.

**Add a passkey.** Open **Settings → Profile → Sign-in methods** and choose **Add passkey**. Your browser asks where
to save it, then for your face, fingerprint or screen lock. If two-factor authentication is on, enter a code from your
authenticator app first. Settings lists the passkey with the password manager that keeps it, and **Synced** when that
password manager shares it with your other devices.

**Sign in with it.** On the sign-in page, choose **Sign in with a passkey**, or click the email field: your browser
may offer the passkey among its suggestions. Pick it and unlock it. That is the whole sign-in: a passkey counts as two
factors, so no authenticator code follows. To sign in on a computer that does not have your passkey, choose **Sign in
with a passkey** there and scan the QR code your browser shows with your phone.

The Haarness apps for iPhone and Android, Desktop and the CLI sign in through this same page, so your passkey works
there too.

**Remove a passkey.** Choose **Remove** next to it in **Settings → Profile → Sign-in methods**. With two-factor
authentication on, removing asks for a current code. Your browser may then also delete it from your password manager;
if it does not, you can delete it there yourself. A passkey always sits beside Google, Apple or email, which can
recover your account if you lose the device that holds it: you cannot remove the last of those while you have
passkeys.

Haarness emails you whenever a passkey is added or removed. Passkeys need Haarness Cloud at its usual address over
https; a self-hosted Cloud reached by IP address offers none.

## Sign in with a password

A password is optional. To add one, open **Settings → Profile → Sign-in methods** and choose **Set password** (or
**Set up** for an account made with Google or Apple); Haarness emails you a link to choose one of at least 15
characters. Then choose **Use a password instead** on the sign-in page.

Forgot it? Choose **Forgot password?** under the password field, enter your email and open the reset link.
Choosing a new password signs out all existing browser and native-client sessions. A reset link works once and
expires in 30 minutes. Email links keep working whether or not you have a password.

Accounts that sign in only with Google or Apple use their provider's recovery: [Google account recovery](https://accounts.google.com/signin/recovery) or [Apple Account recovery](https://iforgot.apple.com).

## Two-factor authentication

Two-factor authentication adds a code from your phone to every sign-in, so a stolen password or mailbox
alone cannot open your account. It is optional and works with email links, passwords, Google and Apple. A passkey needs no code: it is already
two factors.

### Turn on two-factor authentication

1. Open **Settings → Profile** and choose **Set up** under **Two-factor authentication**.
2. Scan the QR code with an authenticator app such as 1Password, Google Authenticator or
   Microsoft Authenticator. On a phone, choose **Open in authenticator app** instead, or enter
   the setup key by hand.
3. Enter the 6-digit code the app shows.
4. Save the ten recovery codes: copy them into your password manager or download them. They are
   shown only once.

### Sign in with a two-factor code

After your email link or code, password, Google account or Apple ID, enter the 6-digit code from your authenticator
app. The code step lasts 10 minutes and allows 5 tries; after that, sign in again.

Keep **Trust this browser for 30 days** selected on your own computer to skip the code there
until it expires. Leave it unselected on shared computers.

### Lost your phone?

Choose **Use a recovery code** on the code step. Each recovery code works once, and Haarness
emails you whenever one is used. Once signed in, open **Settings → Profile** and choose **Replace** to
set up your new phone.

If you have neither your phone nor a recovery code, contact support from the email address on
your account. Support confirms who you are before turning two-factor authentication off.

### Change or turn off two-factor authentication

In **Settings → Profile**, under **Two-factor authentication**, you can:

- **Replace** the authenticator app when you change phones; the old app stops working once the
  new one is confirmed.
- **Generate new codes** to replace every recovery code.
- **Forget all** trusted browsers, so each one asks for a code at its next sign-in.
- **Turn off** two-factor authentication.

Every change asks for a current code first, and Haarness emails you when two-factor
authentication is turned on or off. Resetting your password keeps two-factor authentication on
and makes every browser ask for a code again.

## Sign in the CLI and Desktop

Run `haarness login`, or choose **Sign in to Haarness** in Desktop. The Haarness sign-in page opens in your
browser: sign in as usual, enter your two-factor code if it is on, then approve the app. On a machine without a
browser, such as over SSH, run `haarness login --device`, open the link it prints on any device, check that the
code matches and choose **Approve**.

Your email codes, password and authenticator codes stay on the Haarness sign-in page. The CLI and Desktop never
see them. When the email is on your phone, type its code on the computer's sign-in page. See [Automate with
the CLI and SDKs](https://haarness.ai/docs/cloud/cli-and-sdk.md#sign-in-from-the-terminal).

## See where you are signed in

**Settings → Devices** lists every browser, CLI, Desktop, iPhone and Android phone signed in to your account, with
when each signed in and was last used. Choose **Revoke** next to any you no longer use or do not recognise, or
**Sign out everywhere** to sign out all of them, this browser included. A phone that is signed out stops getting
notifications.

## Work in more than one account

Billing, workspaces and keys belong to an **account**. You start with a personal account; you may also be a member of
others, such as your team's. **Settings → Profile** lists them with your role in each. In the CLI, `haarness
account --select ACCOUNT_ID` switches the account it uses.
