# Sign in with an identity provider through the vendor's managed sign in

> idp browser session: reference page for this CustomDomain™ API operation in the cloud browser group. Covers parameters, request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/cloud-browser/idpBrowserSession

## `POST https://api.customdomain.ai/v1/browser-sessions/{sid}:idp`

On a session whose vendor never shows its page (`no_live_page`: Kernel), the customer pressed our form's "Continue with Google" or "Continue with Apple". The control plane opens the vendor's managed sign in of a profile of this session's own to the identity provider's site, and the view's `idp` carries the connection and its single use `handoff_code`: the popup renders the vendor's form, which talks to the vendor from the customer's browser (no password, code or approval passes through CustomDomain™). On success the remote browser is released and made again on the signed in profile, back on the provider's sign in page (`idp.state` `finishing`), and the popup forwards the customer's press of the provider's own button over the relay; the identity provider asks the customer to confirm the account (the one page the popup frames on such a session), and the sign in notice carries on as usual. Allowed only in `awaiting_sign_in`, with no step running (a failed one may be tried again), for a kind the provider's form offers.

### Authentication

`browserSession`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sid` | path | string | yes | The cloud browser session id, `bs_` and 32 hex characters. |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `provider` | `google`, `apple` | yes | The identity provider. |

### Responses

| Status | Description |
| --- | --- |
| `202` | The step started; the view's `idp` says where it stands. |
| `400` | Error envelope: {code, title, details}. |
| `401` | `browser_expired`: the token is wrong, expired, or for another session. |
| `404` | Error envelope: {code, title, details}. |
| `409` | `browser_wrong_state`: the session is not waiting for the customer, a step is running, or this sign in is not offered for the provider. |
| `410` | `browser_expired`: the session ran out of time. |

### `202` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `state` | `awaiting_sign_in` | no |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
