# Auth session cookies

Run a script on a cloud browser signed in to a site, with one site account or several, for you or for your users.

**Auth session cookies** are the cookies that keep you signed in to one site, so a script on a
cloud browser runs signed in there. You upload them from the Reduck extension while you are signed
in to the site, or you sign in on a Reduck cloud browser (`startConnectorLogin`). Upload again to
refresh them.

## Several site accounts

A site can hold more than one set of Auth session cookies. Each set is told apart by one of two
names:

- **Signed in as** (`account`): the identity on the site that a probe script reported, usually an
  email. You never type it. A run with a `login.probe` that returns `{ connected, account }`
  records it on the set.
- **Label**: a name you give it, in the extension, the API or at
  [reduck.ai/connectors](https://reduck.ai/connectors). A second set for a site needs one until a
  probe has recorded its `account`.

A run picks one set with `account` or `label`; `label: ""` is the set without a label. With no
name, the run uses the only set of the site. When there are several, the run fails and lists them.

## Auth session cookies for your users

If you build a product on Reduck, you can keep Auth session cookies for your users under a
**profile**: a name you choose, such as your user id. Profiles are for the API only: an API key or
an OAuth token can create, read and run with them. A browser signed in to reduck.ai cannot.

- Create them with `createConnector` and a `profile`, or start a login with `profile` and
  `endUserLink: true`. You then get `endUserUrl`, a page your user opens to sign in, with no Reduck
  account. The link opens that one login and stops when it ends. Reduck never gives you back what
  your user typed.
- Run as that user with `profile` on `run_script` or `/run` (cloud browser only). The run uses
  their Auth session cookies and never yours in their place. If they are missing, the run fails.
  It does not use yours.
- At [reduck.ai/connectors](https://reduck.ai/connectors), turn on **Developer view** to pick a
  profile, label its Auth session cookies and test-run them.
