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

# Mobile SDKs

> Learn how to use the Authsignal SDKs for iOS, Android, React Native, and Flutter.

## Requirements

<Tabs>
  <Tab title="iOS">
    Passkeys are supported only on **iOS 15** and above.
    Passkey autofill requires **iOS 16** and above.
  </Tab>

  <Tab title="Android">
    The minimum SDK version required is **Android 6 (API level 23)** or higher.
    The minimum Java version required is **Java 17**.
  </Tab>

  <Tab title="React Native">
    We recommend using React Native version `0.73` or higher because this version includes [Android 14 support](https://reactnative.dev/blog/2023/12/06/0.73-debugging-improvements-stable-symlinks#android-14-support).
    This requires upgrading to **Java 17** and **AGP 8** or higher.
  </Tab>

  <Tab title="Flutter">
    The minimum SDK version required is `3.2.2` and the minimum Flutter version is `3.3.0`.
  </Tab>
</Tabs>

## Installation

<Tabs>
  <Tab title="iOS">
    **Cocoapods**

    Add Authsignal to your Podfile.

    ```rb theme={null}
    pod 'Authsignal', '~> 2.3.0'
    ```

    **Swift Package Manager**

    Add the following to the `dependencies` value of your `Package.swift` file.

    ```swift theme={null}
    dependencies: [
        .package(
            url: "https://github.com/authsignal/authsignal-ios.git",
            from: "2.3.0"
        )
    ]
    ```
  </Tab>

  <Tab title="Android">
    Ensure that you have `mavenCentral` listed in your project's buildscript repositories section.

    ```groovy theme={null}
    buildscript {
        repositories {
            mavenCentral()
            ...
        }
    }
    ```

    Add the following to your app's `build.gradle` file.

    ```groovy theme={null}
    implementation 'com.authsignal:authsignal-android:3.3.0'
    ```
  </Tab>

  <Tab title="React Native">
    Install using yarn.

    ```bash theme={null}
    yarn add react-native-authsignal
    ```

    Then link the native iOS dependencies.

    ```bash theme={null}
    npx pod-install ios
    ```
  </Tab>

  <Tab title="Flutter">
    Add the package dependency to your app.

    ```bash theme={null}
    flutter pub add authsignal_flutter
    ```
  </Tab>
</Tabs>

## Initialization

Initialize the client with your tenant ID and the API URL for your region.

| Region        | API URL                            |
| ------------- | ---------------------------------- |
| US (Oregon)   | `https://api.authsignal.com/v1`    |
| AU (Sydney)   | `https://au.api.authsignal.com/v1` |
| EU (Ireland)  | `https://eu.api.authsignal.com/v1` |
| CA (Montreal) | `https://ca.api.authsignal.com/v1` |

You can find your tenant ID in the [Authsignal Portal](https://portal.authsignal.com/organisations/tenants/api).

<CodeGroup>
  ```swift iOS theme={null}
  import Authsignal

  let authsignal = Authsignal(
      tenantID: "YOUR_TENANT_ID",
      baseURL: "YOUR_REGION_BASE_URL"
  )
  ```

  ```kotlin Android theme={null}
  import com.authsignal.Authsignal

  val authsignal = Authsignal(
      tenantID = "YOUR_TENANT_ID",
      baseURL = "YOUR_REGION_BASE_URL",
      activity = this, // An activity-based context param is required only when using passkeys
  )
  ```

  ```ts React Native theme={null}
  import { Authsignal } from "react-native-authsignal";

  const authsignal = new Authsignal({
    tenantID: "YOUR_TENANT_ID",
    baseURL: "YOUR_REGION_BASE_URL",
  });
  ```

  ```dart Flutter theme={null}
  import 'package:authsignal_flutter/authsignal_flutter.dart';

  final authsignal = Authsignal("YOUR_TENANT_ID", baseURL: "YOUR_REGION_BASE_URL");
  ```
</CodeGroup>

## Usage

<CardGroup>
  <Card title="Passkeys" href="/sdks/client/mobile/passkeys" horizontal />

  <Card title="Push verification" href="/sdks/client/mobile/push-verification" horizontal />

  <Card title="QR code verification" href="/sdks/client/mobile/qr-code-verification" horizontal />

  <Card title="In-app verification" href="/sdks/client/mobile/in-app-verification" horizontal />

  <Card title="Email OTP" href="/sdks/client/mobile/email-otp" horizontal />

  <Card title="SMS OTP" href="/sdks/client/mobile/sms" horizontal />

  <Card title="WhatsApp OTP" href="/sdks/client/mobile/whatsapp" horizontal />

  <Card title="Authenticator app" href="/sdks/client/mobile/totp" horizontal />
</CardGroup>

## Repositories

<CardGroup>
  <Card title="iOS" icon="apple" href="https://github.com/authsignal/authsignal-ios" horizontal />

  <Card title="Android" icon="android" href="https://github.com/authsignal/authsignal-android" horizontal />

  <Card title="React Native" icon="react" href="https://github.com/authsignal/react-native-authsignal" horizontal />

  <Card title="Flutter" icon="flutter" href="https://github.com/authsignal/authsignal-flutter" horizontal />
</CardGroup>
