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

# Auth

> Approve ByteRover skill authentication when an agent needs account access.

Use the Auth skill when your agent says ByteRover needs authentication or cloud sync access for the current workspace.

Most users sign in through ByteRover Desktop during setup. Auth is the agent-side approval flow: the agent prints a browser URL and short code, you approve it, then the agent confirms the connection.

## Ask the agent to authenticate

Ask your agent:

```text theme={null}
Authenticate with ByteRover.
```

The agent starts the ByteRover auth flow.

Manual reference:

```bash theme={null}
node scripts/auth.mjs
```

## Open the URL

The agent will print a browser URL, a short code, and an expiry time.

Open the URL in your browser and approve the request before the code expires.

<Note>
  Use the URL and code printed by your own agent session. Do not copy a code from docs, screenshots, or another terminal.
</Note>

## Return to the agent

After approving in the browser, return to the agent and say:

```text theme={null}
approved
```

The agent checks the auth status.

Manual reference:

```bash theme={null}
node scripts/auth.mjs status
```

## Understand the status

| Status     | Meaning                                   | What to do                                                      |
| ---------- | ----------------------------------------- | --------------------------------------------------------------- |
| `approved` | ByteRover is connected.                   | Continue setup or retry the original Query or Record request.   |
| `pending`  | The browser approval is not finished yet. | Open the URL again, approve it, then return and say `approved`. |
| `expired`  | The code expired.                         | Start Auth again for a fresh URL and code.                      |
| `denied`   | The browser request was rejected.         | Start Auth again only if you want to connect this agent.        |

## Sign out

Ask the agent:

```text theme={null}
Log out of ByteRover.
```

Manual reference:

```bash theme={null}
node scripts/logout.mjs
```

## Check sync status

If cloud sync seems stuck, ask the agent to check ByteRover sync status.

Manual reference:

```bash theme={null}
node scripts/sync.mjs status
```

If the status says `auth-expired`, run Auth again. Never paste API keys into chat to work around an auth problem.
