TSAuthentication

TS Authentication user API

Functions

Link copied to clipboard

Authenticate the user with native biometrics to authorize a specific action. If successful, returns a signed challenge that must be sent to your backend to complete the approval.

Link copied to clipboard
fun approvalWebAuthn(context: Context, webAuthnAuthenticationData: TSWebAuthnAuthenticationData, callback: TSAuthCallback<TSWebAuthnApprovalResult, TSWebAuthnApprovalError>)

Authenticate the user with WebAuthn biometrics to authorize a specific action, using explicit credential request data. If successful, returns a signed result that must be sent to your backend to complete the approval.

Authenticate the user with WebAuthn biometrics to authorize a specific action. If successful, returns a signed result that must be sent to your backend to complete the approval.

Link copied to clipboard

Authenticate a user by prompting for biometrics and signing the provided challenge. On success, returns a signed challenge that must be sent to your backend to complete authentication.

Link copied to clipboard

Authenticate user with Pin Code authenticator.

Link copied to clipboard
fun authenticateWebAuthn(context: Context, webAuthnAuthenticationData: TSWebAuthnAuthenticationData, callback: TSAuthCallback<AuthenticationResult, TSWebAuthnAuthenticationError>)

Authenticate the user using WebAuthn credentials. If the username is not provided, all the credentials for this app in this device will be displayed. This will prompt the user for biometrics. If successful, it returns a webauthn authentication result encoded as a base64 string, which is required to complete the authentication via your backend.

Link copied to clipboard
fun generateTOTP(context: Context, uuid: String, callback: ITSTOTPGenerateTOTPCallback)

Generate a time-based TOTP code for a previously registered authenticator.

Link copied to clipboard
fun generateTOTPWithChallenge(context: Context, uuid: String, challenge: String, callback: ITSTOTPGenerateTOTPCallback)

Generate a challenge-based TOTP code for a previously registered authenticator.

Link copied to clipboard

Retrieve information about the current device, including its registration status and public key.

Link copied to clipboard

Returns the current native biometrics availability status for the device.

Link copied to clipboard
fun initialize(context: Context, clientID: String)

Initialize the SDK using the default API base URL ("https://api.transmitsecurity.io/").

fun initialize(context: Context, clientID: String, baseUrl: String, domain: String? = null, initOptions: TSAuthenticationInitOptions? = null)

Initialize the SDK.

Link copied to clipboard

Initialize the SDK. Client ID and base url values are fetched from app's string resources (transmit_security_client_id and transmit_security_base_url)

Link copied to clipboard

Returns whether the current device supports WebAuthn (FIDO2) authentication. Returns false if the SDK has not been initialized.

Link copied to clipboard

Register the device's biometrics as an authenticator for the given user. On success, returns a signed public key that must be sent to your backend to complete registration.

Link copied to clipboard

Register Pin Code authenticator on the device.

Link copied to clipboard
fun registerTOTP(context: Context, totpURI: String, securityType: TSTOTPSecurityType, callback: ITSRegisterTOTPCallback)

Register a TOTP authenticator from an otpauth:// URI.

Link copied to clipboard
fun registerWebAuthn(context: Context, credentialsCreationOptions: TSWebAuthnRegistrationData, callback: TSAuthCallback<RegistrationResult, TSWebAuthnRegistrationError>)

Register credentials with WebAuthn, including prompting the user for biometrics. If successful, returns a webauthn registration result encoded as a base64 string, which is required to complete the registration via your backend.

Link copied to clipboard

Enable or disable SDK logging. Disabled by default.

Link copied to clipboard
fun signTransactionWebAuthn(context: Context, webAuthnAuthenticationData: TSWebAuthnAuthenticationData, callback: TSAuthCallback<AuthenticationResult, TSWebAuthnAuthenticationError>)

Sign a WebAuthn transaction using explicit credential request data. Prompts the user for biometrics and returns a signed result that must be sent to your backend.

Sign a WebAuthn transaction for the given user. Prompts the user for biometrics and returns a signed result that must be sent to your backend.

Link copied to clipboard

Sign a challenge with the device key.

Link copied to clipboard

Unregister the biometric credential for the given user, removing it from the device.

Link copied to clipboard

Unregister the pin code authenticator for the given user.