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

> ## Agent Instructions
> Turnkey is wallet infrastructure: create and manage crypto wallets, sign transactions, and enforce policy-based access controls. Best-fit uses: embedded consumer wallets (email/passkey/social auth, no seed phrases), automated onchain operations with server-side wallets, AI agent wallets with policy-scoped signing, enterprise key management, and verifiable off-chain workloads on Turnkey Verifiable Cloud (TVC).
> Every API call is a JSON POST to https://api.turnkey.com signed with a P-256 API key; create an organization and key self-serve at https://app.turnkey.com.
> Key Turnkey developer resources: API reference (https://docs.turnkey.com/api-reference/overview/intro.md), OpenAPI spec (https://docs.turnkey.com/public_api.swagger.json), authentication (https://docs.turnkey.com/features/authentication/overview.md), webhooks (https://docs.turnkey.com/features/webhooks/overview.md), MCP server for docs search (https://docs.turnkey.com/mcp), skill for building with Turnkey (https://docs.turnkey.com/skill.md), agent skills for operating an organization (https://docs.turnkey.com/get-started/ai-skills.md), CLI (https://docs.turnkey.com/sdks/cli.md), SDK reference (https://docs.turnkey.com/sdks/introduction.md), full docs content (https://docs.turnkey.com/llms-full.txt).

# signUpWithPasskey()

**Package:** `react-wallet-kit`

### Overview

Signs up a user using a passkey, creating a new sub-organization and session.

<ul>
  <li>This function creates a new passkey authenticator and uses it to register a new sub-organization for the user.</li>
  <li>Handles both passkey creation and sub-organization creation in a single flow.</li>
  <li>Optionally accepts additional sub-organization parameters, a custom session key, a custom passkey display name, and a custom session expiration.</li>
  <li>Automatically generates a new API key pair for authentication and session management.</li>
  <li>Stores the resulting session token and manages cleanup of unused key pairs.</li>
</ul>

### Parameters

**params** `SignUpWithPasskeyParams`

**params details**

Navigate to header

params.
challenge

string

challenge string to use for passkey registration. If not provided, a new challenge will be generated.

Navigate to header

params.
createSubOrgParams

CreateSubOrgParams

parameters for creating a sub-organization (e.g., authenticators, user metadata).

Navigate to header

params.
expirationSeconds

string

session expiration time in seconds (defaults to the configured default).

Navigate to header

params.
organizationId

string

organization ID to target (defaults to the session's organization ID or the parent organization ID).

Navigate to header

params.
passkeyDisplayName

string

display name for the passkey (defaults to a generated name based on the current timestamp).

Navigate to header

params.
sessionKey

string

session key to use for storing the session (defaults to the default session key).

### Response

A successful response returns the following fields:

**returns** `PasskeyAuthResult` *required*

A promise that resolves to a PasskeyAuthResult, which includes:

* `sessionToken`: the signed JWT session token.
* `credentialId`: the credential ID associated with the passkey created.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.