> ## 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).

# Overview

> Learn how to set up, log in, or sign up easily in your Android app using the Turnkey Kotlin SDK.

The Kotlin SDK makes authentication simple.
You can call specific login and signup functions to create your own UI components and authentication flow.

## Authentication state

To check if a user is authenticated, you can use the `authState` variable from the `TurnkeyContext`.

```kotlin theme={"system"}
val authState: AuthState = TurnkeyContext.authState.value
```

## Customize sub-organization creation

Need to configure default user names, passkey names, wallet creations or anything sub-org related?
You can learn more about customizing the sub-orgs you create in the [Sub-Organization Customization](https://docs.turnkey.com/solutions/embedded-wallets/integration-guide/kotlin/sub-organization-customization.md) section.

Follow the guides below to learn how to set up email and SMS authentication, passkey authentication, and social logins in your Android app.

Email & SMS

Set up email and SMS authentication in your Android app.

[Open](https://docs.turnkey.com/solutions/embedded-wallets/integration-guide/kotlin/authentication/email-sms.md)

Passkey Authentication

Set up passkey authentication in your Android app.

[Open](https://docs.turnkey.com/solutions/embedded-wallets/integration-guide/kotlin/authentication/passkey.md)

Social Logins

Add social logins with wallet creation and account derivation in your Kotlin app.

[Open](https://docs.turnkey.com/solutions/embedded-wallets/integration-guide/kotlin/authentication/social-logins.md)

Relying party ID (rpId) setup

Set up the relying party ID for passkey authentication in your Android app.

[Open](https://docs.turnkey.com/solutions/embedded-wallets/integration-guide/kotlin/authentication/rp-id-setup.md)


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