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.
- 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
- 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)
npm install react-native-ts-authenticationFor iOS, install native dependencies and set your minimum target:
cd YOUR_PROJECT_PATH/ios
pod installSet 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/')
}
}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:
| Region | Base URL |
|---|---|
| US | https://api.transmitsecurity.io/ |
| EU | https://api.eu.transmitsecurity.io/ |
| Canada | https://api.ca.transmitsecurity.io/ |
| Australia | https://api.au.transmitsecurity.io/ |
| Japan | https://api.gasne1-ts01.transmitsecurity.io/ |
| Sandbox | https://api.sbx.transmitsecurity.io/ |
| Custom domain | https://<your-domain>.com/ (see Custom domains) |