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

# Signup

> Describes all the hooks and methods available to customize the Universal Login `signup` screen.

The `signup` screen collects the user's credentials to create a new account. It supports standard signup with username, email, phone number, and password, as well as federated signup via social or enterprise connections and Google One Tap.

![Signup](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/5IrmDuvj5xma8DmkIMJ7ol/42363cde670f86561666c9e930f76883/Screenshot_2025-02-05_at_15.43.23.png)

## Import

Each screen has its own set of hooks and methods. The SDK supports **partial import** and **root import** for each screen.

* Using partial import allows you to include only the code you need for your specific use case.
* Using root import allows you to load all screens from a single bundle, which is useful when you want a unified build to handle all possible screens.

```jsx Import Example theme={null}
// root import
import { useSignup } from '@auth0/auth0-acul-react';

// partial import
import {
  useSignup,
  // Context hooks
  useUser,
  useTenant,
  useBranding,
  useClient,
  useCountryCodes,
  useOrganization,
  usePrompt,
  useScreen,
  useTransaction,
  useUntrustedData,
  useExperiment,
  // Common hooks
  useCurrentScreen,
  useAuth0Themes,
  useErrors,
  // Utility hooks
  useChangeLanguage,
  usePasswordValidation,
  useSignupIdentifiers,
  useUsernameValidation,
  // Methods
  signup,
  federatedSignup,
  googleOneTap,
  pickCountryCode,
} from '@auth0/auth0-acul-react/signup';

function SignupForm() {
  const { signup } = useSignup();
  return (
    <button onClick={() => signup({ email: 'user@example.com', password: 'secret' })}>
      Create Account
    </button>
  );
}
```

## Context Hooks

Screen-scoped hooks that provide read-only access to Auth0 context data on the `signup` screen. Import them from `@auth0/auth0-acul-react/signup`.

**useBranding** `() => [BrandingMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/BrandingMembers)`

This hook provides branding configurations, such as logo, colors, and theme settings displayed on the `signup` screen.

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

**useClient** `() => [ClientMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/ClientMembers)`

This hook provides client-related configurations, such as `id`, `name`, and `logoUrl`, for the `signup` screen.

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

**useCountryCodes** `() => [CountryCodesMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/CountryCodesMembers)`

This hook provides the available phone country codes and recommended default for the `signup` screen.

```jsx Example theme={null}
import { useCountryCodes } from '@auth0/auth0-acul-react/signup';
function CountryPicker() {
  const countryCodes = useCountryCodes();
  const available = countryCodes?.available;
}
```

**useExperiment** `() => [ExperimentMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/ExperimentMembers)`

This hook provides the active [Experiment Center](/docs/docs/customize/experiment-center) experiment for the `signup` screen, or `null` when no experiment is active (or the screen has not opted in via `context_configuration`).

```jsx Example theme={null}
import { useExperiment } from '@auth0/auth0-acul-react/signup';
function ExperimentBranch() {
  const experiment = useExperiment();
  if (!experiment) return null;
  return experiment.isControl ? <ControlUI /> : <TreatmentUI />;
}
```

**useOrganization** `() => [OrganizationMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/OrganizationMembers)`

This hook provides information about the user's Organization if the signup is Organization scoped. Returns `null` when no Organization context is present.

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

**usePrompt** `() => [PromptMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/PromptMembers)`

This hook contains data about the current prompt in the authentication flow.

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

**useScreen** `() => [ScreenMembersOnSignup](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/ScreenMembersOnSignup)`

This hook contains details specific to the `signup` screen, including its configuration and context.

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

**useTenant** `() => [TenantMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/TenantMembers)`

This hook contains data related to the tenant, such as `id` and associated metadata.

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

**useTransaction** `() => [TransactionMembersOnSignup](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/TransactionMembersOnSignup)`

This hook provides transaction-specific data for the `signup` screen, such as active connections and current flow state.

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

**useUntrustedData** `() => [UntrustedDataMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/UntrustedDataMembers)`

This hook handles untrusted data passed to the screen, such as a prefilled email or username from URL parameters.

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

**useUser** `() => [UserMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/UserMembers)`

This hook provides details of the active user, including `username`, `email`, and available authentication methods.

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

**useSignup** `[SignupMembers](/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/SignupMembers)`

This hook returns all methods and context available on the `signup` screen.

## Methods

**googleOneTap** `Promise\<void\>`

This method registers a new user using a Google One Tap credential, enabling one-click sign-up without redirecting to a separate page.

```jsx Example theme={null}
import { useSignup } from '@auth0/auth0-acul-react/signup';

function GoogleOneTapHandler({ credential }) {
  const { googleOneTap } = useSignup();
  return googleOneTap({ one_tap_credential: credential });
}
```

**Method Parameters**

**Parameters**

**one\_tap\_credential** `string` *required*

The Google One Tap credential token returned by the Google Identity Services prompt.

**federatedSignup** `Promise\<void\>`

This method redirects the user to the [Social](/docs/docs/authenticate/identity-providers/social-identity-providers) or [Enterprise Identity Provider](/docs/docs/authenticate/identity-providers/enterprise-identity-providers) (IdP) for signup.

```jsx Example theme={null}
import { useSignup } from '@auth0/auth0-acul-react/signup';

function SocialButton() {
  const { federatedSignup } = useSignup();
  return (
    <button onClick={() => federatedSignup({ connection: 'google-oauth2' })}>
      Sign up with Google
    </button>
  );
}
```

**Method Parameters**

**Parameters**

**options**

[FederatedSignupPayloadOptions](/docs/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/FederatedSignupPayloadOptions).

**connection** `string` *required*

The Social or Enterprise Identity Provider connection name.

**pickCountryCode** `Promise\<void\>`

This method opens the country code picker for phone number input during signup.

```jsx Example theme={null}
import { useSignup } from '@auth0/auth0-acul-react/signup';

function CountryCodePicker() {
  const { pickCountryCode } = useSignup();
  return (
    <button onClick={() => pickCountryCode()}>
      Select Country Code
    </button>
  );
}
```

**signup** `Promise\<void\>`

This method submits the user's registration details to create a new account.

```jsx Example theme={null}
import { useSignup } from '@auth0/auth0-acul-react/signup';

function SignupForm() {
  const { signup } = useSignup();
  return (
    <button onClick={() => signup({ email: 'user@example.com', password: 'secret' })}>
      Create Account
    </button>
  );
}
```

**Method Parameters**

**Parameters**

**options**

[SignupPayloadOptions](/docs/docs/libraries/acul/react-sdk/API-Reference/Types/interfaces/SignupPayloadOptions).

**email** `string`

The user's email address.

**password** `string`

The password for the new account.

**username** `string`

The username for the new account, if required by the connection.

**phoneNumber** `string`

The user's phone number, if required by the connection.

**phoneCountryCode?** `string`

The ISO 3166-1 alpha-2 country the user selected for `phoneNumber` (for example, `'US'`), from a `code` in `countryCodes.available`. The submitted country is authoritative — the server prefixes its dial code, so `phoneNumber` should be the national number without a dial code. Omit it to keep the existing behavior, where the server derives the country itself and `pickCountryCode()` changes the selection on a separate screen.

**captcha?** `string`

Captcha value required when bot detection is enabled on the tenant.

**\[`key`: `string`]** `"string" | "number" | "boolean" | "undefined"`

Additional custom fields prefixed with `ulp-` (for example, `'ulp-custom-field'`).

## Common/Utility Hooks

**[useAuth0Themes](/docs/docs/libraries/acul/react-sdk/API-Reference/Hooks/useAuth0Themes)** `Hooks`

This hook gets the current theme options with flattened configuration from branding context.

**[useChangeLanguage](/docs/docs/libraries/acul/react-sdk/API-Reference/Hooks/useChangeLanguage)** `Hooks`

This hook returns a function for changing the display language on the current ACUL screen.

**[useCurrentScreen](/docs/docs/libraries/acul/react-sdk/API-Reference/Hooks/useCurrentScreen)** `Hooks`

This hook gets the current screen context and state.

**[useErrors](/docs/docs/libraries/acul/react-sdk/API-Reference/Hooks/useErrors)** `Hooks`

This hook reads and manages server, client, and developer errors on the screen.

**[usePasswordValidation](/docs/docs/libraries/acul/react-sdk/API-Reference/Hooks/usePasswordValidation)** `Hooks`

This hook validates the user's password against the tenant's password policy requirements.

**[useSignupIdentifiers](/docs/docs/libraries/acul/react-sdk/API-Reference/Hooks/useSignupIdentifiers)** `Hooks`

This hook returns the available signup identifier types (email, username, phone) configured for the connection.

**[useUsernameValidation](/docs/docs/libraries/acul/react-sdk/API-Reference/Hooks/useUsernameValidation)** `Hooks`

This hook validates the user's username against the tenant's username policy requirements.
