Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/signing-sdk/face-auth-ios/llms.txt

Use this file to discover all available pages before exploring further.

TadSigningMode is passed to TadSigningViewController to select which operation to run. The two cases map to distinct WebAuthn flows: credential creation and credential assertion.

Enum declaration

enum TadSigningMode

Cases

.register

Triggers the face liveness check followed by WebAuthn passkey creation for the given bankId. On success, TadSigningResult.success is returned with a requestId that identifies this registration event. The jwt field in the result is an empty string for this mode. Use .register the first time a user sets up biometric signing on a device. If the user later installs the app on a new device, they must register again.

.sign

Triggers WebAuthn passkey authentication followed by ES512 JWT signing. On success, TadSigningResult.success is returned with both a populated jwt and a requestId. The JWT can be forwarded to your backend to verify that the user authenticated successfully. Use .sign for all subsequent authentication and transaction-signing operations after a successful .register.
.register must be called at least once for a given bankId before .sign can succeed. Attempting to sign without a registered passkey will return a .failure result.

Key difference

.register.sign
WebAuthn operationCredential creationCredential assertion
Face liveness checkYesNo
jwt in resultEmpty string ""Populated ES512 JWT
requestId in resultPopulatedPopulated
Requires prior registrationNoYes

Usage example

The following example from the demo app shows both modes wired to separate buttons:
import SwiftUI
import TadSigningSDK

Section {
    // First-time setup: creates a passkey on the device
    Button(action: { present(mode: .register) }) {
        Label("Register", systemImage: "person.badge.plus")
            .frame(maxWidth: .infinity)
    }
    .disabled(isLoading || bankId.isEmpty)

    // Subsequent sign-ins: asserts the passkey and returns a JWT
    Button(action: { present(mode: .sign) }) {
        Label("Sign In", systemImage: "person.badge.key.fill")
            .frame(maxWidth: .infinity)
    }
    .disabled(isLoading || bankId.isEmpty)
}
To pass the mode to TadSigningViewController:
let signingVC = TadSigningViewController(
    config: SDKConfig.shared,
    bankId: bankId,
    dto:    dto,
    mode:   .register  // or .sign
) { result in
    // handle TadSigningResult
}
vc.present(signingVC, animated: true)

Build docs developers (and LLMs) love