Skip to content

sanjaymk908/kyc-integrations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TruKYC SDK

Welcome to the TruKYC SDK repository! This SDK provides a comprehensive solution for on-device KYC (Know Your Customer) processes integrated with Okta MFA for secure, passwordless authentication using facial biometrics.


Repository Structure

This repo contains three main folders, each serving a distinct purpose:

1. Frameworks

  • Contains Dist.framework, the iOS framework implementing the core TruKYC SDK functionality.
  • Use this framework to integrate TruKYC capabilities into your iOS app.
  • This framework handles the core KYC flow including selfie capture, ID scanning, and age verification.

2. TruKYCDemo

  • A standalone iOS app demonstrating the usage of the TruKYC SDK (Dist.framework).
  • Provides an onboarding Intro screen presenting disclaimers and a guide to the two-step TruKYC process:
    • Taking a selfie
    • Scanning an ID (currently supports Driver License, State ID, or US Passport)
  • Guides the user through performing these two steps interactively.
  • Processes the results and displays an info screen summarizing the KYC verification outcome.
  • Useful as a reference implementation or a starting point for your app development.

Demo Videos

TruKYC Demo - Onboarding new user with an ID scan
Watch the demo

TruKYC Demo - facial check after onboarding
Watch the demo after onboarding

3. TruKYCOkta

  • Contains the Xcode workspace for the app enabling integration with Okta for MFA push factor enrollment.

  • Allows users to enroll their devices as a push factor using TruKYC facial biometric verification.

  • After enrollment, this app receives push notifications from Okta as part of the MFA flow for user authentication.

  • Communicates the success or failure of the TruKYC facial biometric results back to Okta to determine the overall MFA outcome.

  • Demonstrates how to integrate TruKYC SDK with Okta's MFA ecosystem seamlessly.

    Demo Videos

TruKYC + Okta – Integration Overview
Watch the demo

TruKYC + Okta – Failed Liveness Check (Presentation Attack)
Watch the demo

Screenshots

TruKYCDemo – On-Device KYC Flow

Intro Screen & Disclaimers Selfie Capture Intermediate real/fake check
KYC Result Screen Summary Screen

TruKYCOkta – Okta MFA Push Factor with TruKYC

App Login Screen Enable Enrollment of Device as Push Recipient Protected URL – Username Entry
Protected URL – Password Entry TruKYC Push Notification Selfie Capture for Verification
Authentication Success Screen Okta Sign-In Success Screen Okta Dashboard – Home

Getting Started

  1. Integrate the SDK:
    Use the Dist.framework from the Frameworks folder in your iOS project to enable TruKYC features.

  2. Explore the Demo:
    Open the TruKYCDemo app project to understand how to wrap the SDK with an onboarding flow and UI screens guiding the user.

  3. Okta Integration:
    Use the TruKYCOkta workspace as a reference for enrolling users as Okta MFA push factors and handling push notifications using the TruKYC facial biometric results.

  4. Test Okta Accounts

You can use the test accounts & password below to log in to the TruKYCOkta iOS app.

  • Choose a credential based on the auth policy you wish to test.
  • Enroll your device as a custom TruKYC push factor
  1. Test Protected Resource

You can validate the authentication flow directly in a browser using the Okta-protected URLs below.
You should use the same test account to log in to the protected web resource that you used to log in to the TruKYCOkta app.

  • For Passkey-based accounts, choose the TruKYC push factor (not password)
  • Subsequently, you will be prompted to register a passkey.
  • For Password-based accounts, use the provided username/password.
  • In both cases, successful login will trigger a TruKYC push notification to the enrolled device.
  • Complete TruKYC authentication on your enrolled device
  • After testing, please open Passwords (on your test device) & delete the Passkey associated with the test user

⚠️ Important Notes

  • Always use an Incognito / Private Window when testing.
  • When switching between Password and Passkey authentication, you must clear browser history, cache, and cookies (or open a fresh incognito window).

🔒 Password + TruKYC Testing

Use this URL in an incognito window to test login with username/password + TruKYC:

Password + TruKYC Test URL


🔑 Passkey + TruKYC Testing

Use this URL in an incognito window to test login with passkey + TruKYC:

Passkey + TruKYC Test URL


Supported ID Types

Currently supported ID documents for verification in the SDK include:

  • Driver License
  • State ID
  • US Passport

🔑 Passkey + TruKYC Accounts

Username Password Authentication Method
[email protected] OktaUser2$ Passkey + TruKYC
[email protected] OktaUser2$ Passkey + TruKYC
[email protected] OktaUser2$ Passkey + TruKYC

🔒 Password + TruKYC Accounts

Username Password Authentication Method
[email protected] OktaUser2$ Password + TruKYC
[email protected] OktaUser2$ Password + TruKYC

⚠️ Important Note:
When switching from Passkey authentication to Password authentication (or vice versa), the user will be automatically signed out.
To continue, you must restart the TruKYCOkta iOS app and log in again with the new credentials.


TruKYC SDK Integration Guide

🚀 API Usage — Integrating TruKYC into Your App

To launch the TruKYC onboarding flow, simply call:

let kycVC = ClientAPI.shared.start()

You should assign a ClientAPIDelegate to receive the result once the flow finishes.


✅ UIKit — Full-Screen Modal Presentation

class ViewController: UIViewController, ClientAPIDelegate {
    override func viewDidLoad() {
        super.viewDidLoad()

        // Register delegate
        ClientAPI.shared.delegate = self

        // Launch TruKYC flow
        let kycVC = ClientAPI.shared.start()
        present(kycVC, animated: true)
    }

    // Called when KYC is complete
    func completedKYC(result: KYCResult) {
        print("📬 KYC Completed")
        print("✅ Real score: \(result.realProb)")
        print("🔗 Match score: \(result.selfieIDprofileMatchProb)")
        print("👤 Selfie real: \(result.isSelfieReal)")
        print("🍷 Over 21: \(result.isUserAbove21)")
        print("❌ Failure Reason: \(result.failureReason)")
    }
}

📌 UIKit — Embedded (Non-Fullscreen)

let embeddedViewController = ClientAPI.shared.start(fullScreen: false)
addChild(embeddedViewController)
view.addSubview(embeddedViewController.view)
embeddedViewController.didMove(toParent: self)

🧩 SwiftUI Integration

struct TruKYCView: View {
    var body: some View {
        TruKYCRepresentable()
    }
}

struct TruKYCRepresentable: UIViewControllerRepresentable {
    func makeUIViewController(context: Context) -> UIViewController {
        return ClientAPI.shared.start()
    }

    func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}

Disclaimer

This SDK is provided as a technical and compliance aid. Please ensure you follow your local regulations when using TruKYC SDK for age verification and identity proofing. The TruKYCDemo app includes disclaimers and user guidance.


For detailed documentation, integration guides, and troubleshooting tips, please refer to the docs folder (if available) or contact the maintainers.


Happy coding with TruKYC!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published