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

# useAuthenticateWithEmailOrPhone

> Returns a mutation for email or phone authentication.

<MethodDocs
  defaultExpanded={true}
  preventCollapse={true}
  name="useAuthenticateWithEmailOrPhone()"
  description="A mutation hook that handles the entire email or phone authentication flow in a single call — signup or login, verification, session waiting, and wallet creation."
  parameters={[
{
  name: "auth",
  type: "VerifiedAuth",
  typeLink: "/v3/references/types/verifiedauth",
  required: true,
  description: "The user's email address or phone number, in the form `{ email: '...' } | { phone: '+1...' }`."
},
{
  name: "sessionPollingCallbacks",
  type: "PollingCallbacks",
  optional: true,
  description: "Callbacks fired while polling for session status. Includes `onPoll`, `onCancel`, and `isCanceled`."
},
{
  name: "portalTheme",
  type: "Theme",
  optional: true,
  description: "The theme to apply to generated URLs, if different from your configured theme."
},
{
  name: "useShortUrls",
  type: "boolean",
  optional: true,
  description: "Whether to shorten generated URLs. This may correct any issues with generated QR codes."
}
]}
  returns={{ type: "{ authenticateWithEmailOrPhone: (params) => void, authenticateWithEmailOrPhoneAsync: (params) => Promise<AuthenticateResponse>, data: AuthenticateResponse | undefined, isPending: boolean, error: Error | null, reset: () => void }", description: "A mutation result with `authenticateWithEmailOrPhone` / `authenticateWithEmailOrPhoneAsync` functions, `data`, and standard React Query mutation fields." }}
  async={true}
/>

<Note>
  This hook must be paired with `para.onStatePhaseChange()` to handle portal URLs that appear during authentication (verification, passkey, password, PIN). See [Handling State Changes](/v3/react/guides/custom-ui-simplified#handling-state-changes) for the full state listener pattern.
</Note>
