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

# Sign-ins your users let the browser keep

> With save_sign_in on an ask, your user can let their browser sign in to that site by itself next time, so a site that signs them out doesn't need them again.

A site signs a browser out now and then: a session that ran out, a password change elsewhere. Without a saved password, every such sign-in needs your user again, through a new hand link. With `save_sign_in` on the ask, your user can let the browser keep the password they sign in with, and the agent's `sign_in` uses it from then on.

## Ask with save\_sign\_in

```bash theme={null}
curl https://console.hotkey.so/v1/asks \
  -H "Authorization: Bearer $USER_KEY" -H "content-type: application/json" \
  -d '{ "browser": "brw_k3m9x2p7qa4t", "url": "https://mail.example.com/login",
        "reason": "Sign in to your mailbox", "save_sign_in": true,
        "return_url": "https://app.acme.com/connected?user=829" }'
```

An agent passes `save_sign_in: true` to `request_human` the same way.

## What your user sees

Once their sign-in went through on the link's page (the password field is gone), the link asks:

> Let this browser sign in to mail.example.com by itself next time?
> Acme can then sign in to mail.example.com as [ana@example.com](mailto:ana@example.com) without asking you. The password stays in this browser, encrypted, and nobody can read it back, Acme included.

**Let it sign in** keeps it; **Not now** doesn't. Done waits for the answer. It is offered only on the sites the link is for, only while the ask waits, and only to the link's guest: an [embed](https://docs.hotkey.so/embed.md) is never offered it.

## What happens next

* The browser keeps the password in its own keyring, encrypted, as a password its owner saved. The agent's `sign_in` types it and submits the form; the password never appears in a tool result.
* No route returns it. `GET /v1/browsers/{id}/sign_ins` lists the browser's saved sign-ins with their site, username and `saved_by` (`link` for these), never a password.
* An ask with `save_sign_in` opens in a new sealed tab on its `url`, or on the page of the `tab` you name; the ask's `tab` is that new tab. A sealed tab is one the browser opens itself: no other window can reach it, and `javascript_tool` never runs in it, nor in any window it opens. It opens only web pages (no `data:` or `javascript:` addresses). Read it with `read_page`, `find`, `get_page_text` or a screenshot.
* While your user is on that tab, your tools that read it, take its picture or act on it wait until they're done (their link ends or they leave the tab), within the call's limit, and then say the person is signing in. `computer` with `wait`, `tabs_context_mcp` and `read_network_requests` (which records no bodies) still answer. Meanwhile the tab's title is its site's host everywhere you see it (tabs\_context\_mcp, list\_connected\_browsers, `/v1` tabs, asks and events), since a page can put what is typed into its title. When they're done, what they typed in a password field and didn't send is cleared from the page, and from any page of that tab you go back or forward to; a value they typed into a password field is cleared wherever the page sets it again, and the site's sessionStorage on that tab is cleared. A site that writes the typed password to its localStorage or its own server keeps it there, and may show it again on a later page: that is the site's own doing, and out of Hotkey's reach. A password field's value always reads as `••••••••`. The tab stays sealed after a restart.
* The offer comes only in that sealed tab, and not while a service worker of the site runs that wasn't there before your agent's first script on it. Otherwise nothing is offered, and the activity says why.
* `sign_in` with one of these never types in your tab: it opens a sealed tab on the same page, types there, and its answer names the new tab (`Tab ID`), which your session goes on in. From the start of typing until a few seconds after, no tool acts on that tab or takes its picture (a call in that time waits, at most 5 s), and the live view and embeds don't show it. `sign_in` waits for your calls already running on the tab first.
* A site that also asks for a code each time (a text message) still needs your user for the code. The ask then starts on the code page, not the password.

## Forgetting it

* `DELETE /v1/browsers/{id}/sign_ins/{id}` forgets one, for a user who stops using your app but whose browser you keep.
* Deleting the browser (`DELETE /v1/browsers/{id}`) erases its keyring with everything else.
* Your user changing their password on the site makes the saved one useless; the next sign-in then needs them again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.