completeAuthLink
Poll the backend until the user finishes signup, then persist the bearer token to the local auth file. Use after createSimulatorSession reports 'auth_required' and autoLink was disabled or timed out.
Instructions
Poll the backend until the user finishes signup at the verificationUrl, then persist the bearer token to ~/.extentos/auth.json. USE after createSimulatorSession returns status:'auth_required' AND you set autoLink:false (or the inline poll timed out). DON'T USE preemptively. Note (Bundle 10+): createSimulatorSession's autoLink arg (default true) handles this inline for you in the typical case; you only need to call completeAuthLink directly if you opted out of autoLink or the user took longer to approve than autoLinkSeconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceCode | Yes | The `deviceCode` from createSimulatorSession's auth_required (HTTP 402) response — the opaque handle the backend correlates the developer's signup with. A stale/unknown code returns unknown_device_code (call createSimulatorSession again for a fresh one). | |
| maxWaitSeconds | No | Max seconds to keep polling for the developer to finish signup. Default 600 (also the cap). On timeout returns auth_timeout (retryable) — call again with the SAME deviceCode while it's still valid. | |
| pollIntervalSeconds | No | Seconds between backend polls. Default 5; clamped to [1, 30]. The backend may push a longer interval, which then overrides this value. |