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

# OrganizationPicker

> Describe todos los hooks y métodos disponibles para personalizar la pantalla `organization-picker` de Universal Login.

La pantalla `organization-picker` se muestra cuando un usuario necesita seleccionar una organización para iniciar sesión. Permite elegir una organización o omitir este paso.

<Frame>
  <img style={{maxHeight:"400px"}} src="https://mintcdn.com/translations/3nS3prIggmJG9TUI/docs/images/cdy7uua7fh8z/3aFR1VujjNlIauzRAuMapf/12e80cb2e3f131d2eb45aa0ca13f1d8c/Screenshot_2025-03-25_at_20.49.09.png?fit=max&auto=format&n=3nS3prIggmJG9TUI&q=85&s=959a051c537a331db638a0828bf22d2f" alt="Selector de organización de ACUL" width="362" height="493" data-path="docs/images/cdy7uua7fh8z/3aFR1VujjNlIauzRAuMapf/12e80cb2e3f131d2eb45aa0ca13f1d8c/Screenshot_2025-03-25_at_20.49.09.png" />
</Frame>

<div id="import">
  ## Importación
</div>

Cada pantalla tiene su propio conjunto de hooks y métodos. El SDK admite **importación parcial** e **importación desde la raíz** para cada pantalla.

* Usar la importación parcial te permite incluir solo el código que necesitas para tu caso de uso específico.
* Usar la importación desde la raíz te permite cargar todas las pantallas desde un único paquete, lo que resulta útil cuando quieres una compilación unificada para gestionar todas las pantallas posibles.

```jsx Import Example theme={null}
// importación desde la raíz
import { useOrganizationPicker } from '@auth0/auth0-acul-react';

// importación parcial
import {
  useOrganizationPicker,
  // Hooks de contexto
  useUser,
  useTenant,
  useBranding,
  useClient,
  useOrganization,
  usePrompt,
  useScreen,
  useTransaction,
  useUntrustedData,
  // Hooks comunes
  useCurrentScreen,
  useAuth0Themes,
  useErrors,
  // Hooks de utilidad
  useChangeLanguage,
  // Métodos
  selectOrganization,
  skipOrganizationSelection,
} from '@auth0/auth0-acul-react/organization-picker';

function OrganizationPickerScreen() {
  const { selectOrganization } = useOrganizationPicker();
  return (
    <button onClick={() => selectOrganization({ organization: 'my-org', state: 'abc123' })}>Select</button>
  );
}
```

<div id="context-hooks">
  ## Hooks de contexto
</div>

Hooks con ámbito de pantalla que proporcionan acceso de solo lectura a los datos de contexto de Auth0 en la pantalla `organization-picker`. Impórtelos desde `@auth0/auth0-acul-react/organization-picker`.

<ParamField body="useBranding" type={<span>() =&gt; <a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/BrandingMembers">BrandingMembers</a></span>}>
  Este hook proporciona la configuración de marca, como el logotipo, los colores y la configuración del tema que se muestran en la pantalla `organization-picker`.

  ```jsx Example theme={null}
  import { useBranding } from '@auth0/auth0-acul-react/organization-picker';
  function CustomTheme() {
    const branding = useBranding();
  }
  ```
</ParamField>

<ParamField body="useClient" type={<span>() =&gt; <a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/ClientMembers">ClientMembers</a></span>}>
  Este hook proporciona la configuración relacionada con el cliente, como `id`, `name` y `logoUrl`, para la pantalla `organization-picker`.

  ```jsx Example theme={null}
  import { useClient } from '@auth0/auth0-acul-react/organization-picker';
  function AppInfo() {
    const client = useClient();
  }
  ```
</ParamField>

<ParamField body="useOrganization" type={<span>() =&gt; <a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/OrganizationMembers">OrganizationMembers</a></span>}>
  Este hook proporciona información sobre el contexto de Organización del usuario en la pantalla `organization-picker`. Devuelve `null` cuando no hay ningún contexto de Organización.

  ```jsx Example theme={null}
  import { useOrganization } from '@auth0/auth0-acul-react/organization-picker';
  function OrgSelector() {
    const organization = useOrganization();
    if (!organization) {
      return <p>No Organization context</p>;
    }
  }
  ```
</ParamField>

<ParamField body="usePrompt" type={<span>() =&gt; <a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/PromptMembers">PromptMembers</a></span>}>
  Este hook contiene datos sobre la pantalla actual del flujo de autenticación.

  ```jsx Example theme={null}
  import { usePrompt } from '@auth0/auth0-acul-react/organization-picker';
  function FlowInfo() {
    const prompt = usePrompt();
  }
  ```
</ParamField>

<ParamField body="useScreen" type={<span>() =&gt; <a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/ScreenMembers">ScreenMembers</a></span>}>
  Este hook contiene detalles específicos de la pantalla `organization-picker`, incluida su configuración y contexto.

  ```jsx Example theme={null}
  import { useScreen } from '@auth0/auth0-acul-react/organization-picker';
  function ScreenDebug() {
    const screen = useScreen();
  }
  ```
</ParamField>

<ParamField body="useTenant" type={<span>() =&gt; <a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/TenantMembers">TenantMembers</a></span>}>
  Este hook contiene datos relacionados con el inquilino, como `id` y los metadatos asociados.

  ```jsx Example theme={null}
  import { useTenant } from '@auth0/auth0-acul-react/organization-picker';
  function TenantInfo() {
    const tenant = useTenant();
  }
  ```
</ParamField>

<ParamField body="useTransaction" type={<span>() =&gt; <a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/TransactionMembers">TransactionMembers</a></span>}>
  Este hook proporciona datos específicos de la transacción para la pantalla `organization-picker`, como las conexiones activas y el estado actual del flujo.

  ```jsx Example theme={null}
  import { useTransaction } from '@auth0/auth0-acul-react/organization-picker';
  function TransactionInfo() {
    const transaction = useTransaction();
  }
  ```
</ParamField>

<ParamField body="useUntrustedData" type={<span>() =&gt; <a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/UntrustedDataMembers">UntrustedDataMembers</a></span>}>
  Este hook proporciona acceso a los datos no confiables que se pasan a la pantalla, como los parámetros rellenados previamente desde cadenas de consulta de URL.

  ```jsx Example theme={null}
  import { useUntrustedData } from '@auth0/auth0-acul-react/organization-picker';
  function PrefilledForm() {
    const untrustedData = useUntrustedData();
  }
  ```
</ParamField>

<ParamField body="useUser" type={<span>() =&gt; <a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/UserMembers">UserMembers</a></span>}>
  Este hook proporciona información sobre el usuario activo, incluidos `username`, `email` y los métodos de autenticación disponibles.

  ```jsx Example theme={null}
  import { useUser } from '@auth0/auth0-acul-react/organization-picker';
  function UserProfile() {
    const user = useUser();
  }
  ```
</ParamField>

<ParamField body="useOrganizationPicker" type={<a href="/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/OrganizationPickerMembers">OrganizationPickerMembers</a>}>
  Este hook devuelve todos los métodos y el contexto disponibles en la pantalla `organization-picker`.
</ParamField>

<div id="methods">
  ## Métodos
</div>

<ParamField body="selectOrganization" type="Promise<void>">
  Este método envía la organización seleccionada por el usuario y continúa el flujo de autenticación.

  ```jsx Example theme={null}
  import { useOrganizationPicker } from '@auth0/auth0-acul-react/organization-picker';

  function SelectButton() {
    const { selectOrganization } = useOrganizationPicker();
    return (
      <button onClick={() => selectOrganization({ organization: 'my-org', state: 'abc123' })}>
        Select Organization
      </button>
    );
  }
  ```

  **Parámetros del método**

  <Expandable title="Parámetros">
    <ParamField body="options">
      [SelectOrganizationOptions](/es/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/SelectOrganizationOptions).
    </ParamField>

    <ParamField body="organization" type="string" required>
      El identificador de la organización seleccionado por el usuario.
    </ParamField>

    <ParamField body="state" type="string" required>
      El valor actual del estado de autenticación.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="skipOrganizationSelection" type="Promise<void>">
  Este método permite omitir el paso de selección de organización y continuar el flujo de autenticación sin seleccionar ninguna organización.

  ```jsx Example theme={null}
  import { useOrganizationPicker } from '@auth0/auth0-acul-react/organization-picker';

  function SkipButton() {
    const { skipOrganizationSelection } = useOrganizationPicker();
    return (
      <button onClick={() => skipOrganizationSelection()}>
        Skip
      </button>
    );
  }
  ```
</ParamField>

<div id="commonutility-hooks">
  ## Hooks comunes y de utilidad
</div>

<ParamField body={<a href="/es/docs/libraries/acul/react-sdk/API-Reference/Hooks/useAuth0Themes">useAuth0Themes</a>} type="Hooks">
  Este hook obtiene las opciones del tema actual con la configuración consolidada del contexto de marca.
</ParamField>

<ParamField body={<a href="/es/docs/libraries/acul/react-sdk/API-Reference/Hooks/useChangeLanguage">useChangeLanguage</a>} type="Hooks">
  Este hook devuelve una función para cambiar el idioma que se muestra en la pantalla actual de ACUL.
</ParamField>

<ParamField body={<a href="/es/docs/libraries/acul/react-sdk/API-Reference/Hooks/useCurrentScreen">useCurrentScreen</a>} type="Hooks">
  Este hook obtiene el contexto y el estado de la pantalla actual.
</ParamField>

<ParamField body={<a href="/es/docs/libraries/acul/react-sdk/API-Reference/Hooks/useErrors">useErrors</a>} type="Hooks">
  Este hook lee y administra los errores del servidor, del cliente y del desarrollador que se muestran en la pantalla.
</ParamField>
