{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"redocly_category":"SDK Reference","type":"markdown"},"seo":{"title":"Overview","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"overview","__idx":0},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cordova-ts-authentication"]}," plugin brings Mosaic Authentication to a Cordova app on iOS and Android. It exposes passkeys (WebAuthn), native biometrics, PIN code, TOTP, and device-key signing on the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cordova.tsauth"]}," object. Every method except ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isUserCanceled"]}," returns a Promise."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"capabilities","__idx":1},"children":["Capabilities"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Passkeys (WebAuthn): registration, authentication, transaction signing, and cross-device approval"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Native biometrics: Face ID, Touch ID, and Android BiometricPrompt"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Device-bound PIN code with a two-phase commit"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TOTP authenticator registration and code generation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Device key signing"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"requirements","__idx":2},"children":["Requirements"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cordova-ios"]}," 8.0.0 or higher"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cordova-android"]}," 12.0.0 or higher (14.0.1 or higher recommended). ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cordova-android"]}," 12 is the floor because the native biometric prompt needs a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FragmentActivity"]},", and that is the version where ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CordovaActivity"]}," became an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AppCompatActivity"]},". You do not need to modify ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MainActivity"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["iOS 13.0 or higher, Xcode 16 or higher (Swift Package Manager must reach GitHub)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Android ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minSdk"]}," 24 (the SDK floor is API 21), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["compileSdk"]}," 35"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installation","__idx":3},"children":["Installation"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"cordova plugin add https://github.com/TransmitSecurity/cordova_ts_authentication_plugin.git#v1.0.0\ncordova platform add ios android\ncordova prepare ios android\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"platform-configuration","__idx":4},"children":["Platform configuration"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"iOS","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set the deployment target to 13.0 or higher in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["config.xml"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<platform name=\"ios\">\n    <preference name=\"deployment-target\" value=\"13.0\" />\n</platform>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Passkeys require an Associated Domains entitlement. The plugin cannot add this, because it needs your relying-party domain:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<platform name=\"ios\">\n    <config-file target=\"*/Entitlements-Debug.plist\" parent=\"com.apple.developer.associated-domains\">\n        <array><string>webcredentials:your-domain.com</string></array>\n    </config-file>\n    <config-file target=\"*/Entitlements-Release.plist\" parent=\"com.apple.developer.associated-domains\">\n        <array><string>webcredentials:your-domain.com</string></array>\n    </config-file>\n</platform>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The domain must also serve ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/.well-known/apple-app-site-association"]}," with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webcredentials"]}," entry for your app id. Without that file, passkey registration fails with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invalidDomain"]},". See the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/webauthn/quick_start_sdk_ios"},"children":["iOS WebAuthn quickstart"]}," for the associated-domain setup."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The plugin adds ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NSFaceIDUsageDescription"]}," with the string ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Used to authenticate you with Face ID."]}," Override it in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["config.xml"]}," when you want different wording."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Xcode resolves the native SDK through Swift Package Manager on the first build. If it does not, use ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]}," → ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Packages"]}," → ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Resolve Package Versions"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This plugin does not use CocoaPods. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cordova prepare"]}," removes the unused CocoaPods files that cordova-ios generates, so the iOS project stays on Swift Package Manager."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Android","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minSdk"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["config.xml"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<platform name=\"android\">\n    <preference name=\"android-minSdkVersion\" value=\"24\" />\n</platform>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The plugin adds the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INTERNET"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ACCESS_NETWORK_STATE"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USE_BIOMETRIC"]}," permissions, the Transmit Security Maven repository, and the SDK dependency."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Passkeys require Digital Asset Links. Serve ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/.well-known/assetlinks.json"]}," on your domain, including the app package name and the signing-certificate SHA-256 fingerprint. Without that file, registration fails with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invalidDomain"]},". See the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/webauthn/quick_start_sdk_android"},"children":["Android WebAuthn quickstart"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["after_prepare"]}," hooks re-enable Kotlin compilation (cordova-android turns it off on every prepare) and pin the Gradle wrapper. Both run automatically when you run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cordova prepare"]},"."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"credentials","__idx":5},"children":["Credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initializeSDK()"]}," reads credentials from a native config file. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initialize(clientId, options)"]}," takes them in JavaScript. Use one of the two."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"iOS","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ship ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransmitSecurity.plist"]}," as a resource:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<platform name=\"ios\">\n    <resource-file src=\"resources/ios/TransmitSecurity.plist\" target=\"TransmitSecurity.plist\" />\n</platform>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n    <key>credentials</key>\n    <dict>\n        <key>baseUrl</key>\n        <string>https://api.transmitsecurity.io/</string>\n        <key>clientId</key>\n        <string>YOUR_CLIENT_ID</string>\n        <key>domain</key>\n        <string>your-domain.com</string>\n    </dict>\n</dict>\n</plist>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["configurationFile"]}," argument is the iOS plist basename. Android ignores it."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Android","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the credentials to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strings.xml"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<resources>\n    <string name=\"transmit_security_client_id\">YOUR_CLIENT_ID</string>\n    <string name=\"transmit_security_base_url\">https://api.transmitsecurity.io/</string>\n    <string name=\"transmit_security_domain\">your-domain.com</string>\n</resources>\n","lang":"xml"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["domain"]}," is the WebAuthn relying-party domain. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}," is the Mosaic API host for your region:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Region"},"children":["Region"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Base URL"},"children":["Base URL"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["US"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.transmitsecurity.io/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["EU"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.eu.transmitsecurity.io/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Canada"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.ca.transmitsecurity.io/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Australia"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.au.transmitsecurity.io/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Japan"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.gasne1-ts01.transmitsecurity.io/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sandbox"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.sbx.transmitsecurity.io/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom domain"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://<your-custom-domain>/"]}," (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/deployment/custom_domains"},"children":["Custom domains"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initialization","__idx":6},"children":["Initialization"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cordova.tsauth"]}," object is available after the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deviceready"]}," event."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"document.addEventListener('deviceready', async function () {\n  await cordova.tsauth.setLoggingEnabled(true);\n  await cordova.tsauth.initializeSDK();\n\n  if (await cordova.tsauth.isWebAuthnSupported()) {\n    const { result } = await cordova.tsauth.registerWebAuthn('alice@example.com', 'Alice');\n    // POST result to your backend to complete registration\n  }\n}, false);\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Or initialize with explicit parameters. Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webAuthnApiPaths"]}," only when passkey ceremonies go through your own backend:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"await cordova.tsauth.initialize('YOUR_CLIENT_ID', {\n  baseUrl: 'https://api.transmitsecurity.io/',\n  domain: 'your-domain.com',\n  webAuthnApiPaths: {\n    startRegistration: '/webauthn/register/start',\n    startAuthentication: '/webauthn/authenticate/start',\n  },\n});\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":7},"children":["Next steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Call the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-authentication/functions"},"children":["Authentication functions"]}," for passkeys, biometrics, PIN code, TOTP, and device-key signing."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This plugin is often used with the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-identity-orchestration/orchestration_overview"},"children":["Orchestration SDK"]},". When a journey reaches a passkey, biometrics, or TOTP step, create the credential here and send it back to the journey with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["submitClientResponse"]},". For passkey registration, submit the encoded result as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webauthn_encoded_result"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const { result } = await cordova.tsauth.registerWebAuthn(response.data.username);\nawait cordova.tsido.submitClientResponse('clientInput', { webauthn_encoded_result: result });\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-identity-orchestration/enums/steps"},"children":["journey steps"]}," for this step in a journey handler."]}]},"headings":[{"value":"Overview","id":"overview","depth":1},{"value":"Capabilities","id":"capabilities","depth":2},{"value":"Requirements","id":"requirements","depth":2},{"value":"Installation","id":"installation","depth":2},{"value":"Platform configuration","id":"platform-configuration","depth":2},{"value":"Credentials","id":"credentials","depth":2},{"value":"Initialization","id":"initialization","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Authentication SDK for Cordova","markdown":{"toc":{"depth":2}},"seo":{"title":"Overview"}},"lastModified":"2026-11-02T11:00:30.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-ref/cordova-ts-authentication/authentication_overview","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}