Skip to content

The react-native-ts-authentication is a React Native module for Mosaic Authentication. It provides secure biometric authentication capabilities for your mobile application. It wraps both Apple's public-private key authentication for passkeys on iOS and Google's Credential Manager API for passkeys on Android, delivering a unified native experience for FIDO2-based authentication.

Capabilities

  • WebAuthn passkey registration and authentication
  • Native biometric authentication (FaceID/TouchID on iOS, fingerprint/face on Android)
  • Transaction signing with WebAuthn and native biometrics
  • PIN code registration and authentication
  • Device info and WebAuthn support detection

Requirements

  • iOS 15.0+
  • Android 5+ (API level 21+)
  • Device with registered biometrics (FaceID/TouchID on iOS, fingerprint/face on Android)
  • iCloud Keychain enabled (iOS) or Google Play Services (Android)

Installation

npm install react-native-ts-authentication

For iOS, install native dependencies and set your minimum target:

cd YOUR_PROJECT_PATH/ios
pod install

Set platform :ios, '15.0' in your Podfile.

For Android, add the Mosaic Maven repository to your app/build.gradle:

repositories {
    google()
    maven {
        url('https://transmit.jfrog.io/artifactory/transmit-security-gradle-release-local/')
    }
}

Initialization

Create a TransmitSecurity.plist file in your Xcode project:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>credentials</key>
    <dict>
        <key>baseUrl</key>
        <string>[BASE_URL]</string>
        <key>clientId</key>
        <string>[CLIENT_ID]</string>
    </dict>
</dict>
</plist>

Initialize the SDK:

import TSAuthenticationSDKModule from 'react-native-ts-authentication';

TSAuthenticationSDKModule.initializeSDK();

Alternatively, initialize with explicit parameters:

TSAuthenticationSDKModule.initialize('YOUR_CLIENT_ID');

Configure the base server URL based on your region:

RegionBase URL
UShttps://api.transmitsecurity.io/
EUhttps://api.eu.transmitsecurity.io/
Canadahttps://api.ca.transmitsecurity.io/
Australiahttps://api.au.transmitsecurity.io/
Japanhttps://api.gasne1-ts01.transmitsecurity.io/
Sandboxhttps://api.sbx.transmitsecurity.io/
Custom domainhttps://<your-domain>.com/ (see Custom domains)