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

# embedded.authenticated

> Emitted when the embedded auth() method is successfully called.

## Event Properties

| Field          | Value                      |
| -------------- | -------------------------- |
| `event`        | `"embedded.authenticated"` |
| `confidential` | `boolean`                  |
| `payload`      | `object`                   |

<Tabs>
  <Tab title="Public Payload">
    | Field              | Type                          | Description                              |
    | ------------------ | ----------------------------- | ---------------------------------------- |
    | `tokenType`        | `string \| undefined`         | Type of authentication token             |
    | `scope`            | `string \| undefined`         | OAuth scope granted                      |
    | `expiresIn`        | `number \| null \| undefined` | Access token expiration time in seconds  |
    | `refreshExpiresIn` | `number \| null \| undefined` | Refresh token expiration time in seconds |
    | `hasRefreshToken`  | `boolean`                     | Whether a refresh token was provided     |
    | `hasIdToken`       | `boolean`                     | Whether an ID token was provided         |
    | `hasProfile`       | `boolean`                     | Whether user profile data was included   |

    #### Example

    ```json theme={null}
    {
      "event": "embedded.authenticated",
      "confidential": false,
      "payload": {
        "tokenType": "Bearer",
        "scope": "openid profile",
        "expiresIn": 3600,
        "refreshExpiresIn": 7200,
        "hasRefreshToken": true,
        "hasIdToken": true,
        "hasProfile": true
      }
    }
    ```
  </Tab>

  <Tab title="Confidential Payload">
    | Field              | Type                          | Description                              |
    | ------------------ | ----------------------------- | ---------------------------------------- |
    | `tokenType`        | `string \| undefined`         | Type of authentication token             |
    | `scope`            | `string \| undefined`         | OAuth scope granted                      |
    | `expiresIn`        | `number \| null \| undefined` | Access token expiration time in seconds  |
    | `refreshExpiresIn` | `number \| null \| undefined` | Refresh token expiration time in seconds |
    | `hasRefreshToken`  | `boolean`                     | Whether a refresh token was provided     |
    | `hasIdToken`       | `boolean`                     | Whether an ID token was provided         |
    | `hasProfile`       | `boolean`                     | Whether user profile data was included   |

    #### Example

    ```json theme={null}
    {
      "event": "embedded.authenticated",
      "confidential": true,
      "payload": {
        "tokenType": "Bearer",
        "scope": "openid profile",
        "expiresIn": 3600,
        "refreshExpiresIn": 7200,
        "hasRefreshToken": true,
        "hasIdToken": true,
        "hasProfile": true
      }
    }
    ```
  </Tab>
</Tabs>
