KYC/KYB Verification in Mobile Apps: Integration & Implementation

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
KYC/KYB Verification in Mobile Apps: Integration & Implementation
Complex
~5 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    858
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    743
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1159
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1034
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    968
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    562

KYC/KYB Verification in a Mobile App

KYC (Know Your Customer) and KYB (Know Your Business) are not just "upload a passport photo." They are a set of technical and regulatory requirements: identity verification, liveness detection, sanctions list screening, AML screening, data storage, and audit logging. The mobile app is the data collection point and process orchestrator. We implement KYC/KYB turnkey: integrate SDKs, configure the backend, and handle all verification statuses. Timelines start from 15 business days. Mistakes here are costly—license revocation or regulator fines. Our team has 5+ years of experience and has completed 50+ KYC integration projects. We guarantee compliance with regulatory standards, including GDPR and AML directives. Certified engineers handle every integration. Contact us for a consultation to assess your project. Integration costs typically range from $5,000 to $15,000 depending on complexity, but choosing the right provider can reduce maintenance costs by 30%.

How to Choose a KYC Provider?

Building KYC in-house is rare. Document processing, liveness detection with attack protection (photos, deepfake video, 3D masks), sanctions screening (OFAC, EU, UN)—this is a separate product requiring years of development and constant updates. Integrating a ready-made SDK is orders of magnitude cheaper than building from scratch, saving project budget.

Mature SDKs on the market include Onfido, Jumio, Sumsub, IDnow, Veriff, and Stripe Identity. The choice depends on user geography, document types, regulator requirements, and pricing model. We integrate the provider's SDK into the mobile app, configure server-side webhooks, build the UI flow, and handle all verification states. Contact us—we'll help you choose the optimal provider.

Provider Liveness Documents (countries) KYB Enterprise Protection
Onfido Passive 195 Yes Deepfake, 3D masks
Jumio Active 200+ Yes Deepfake, 3D masks
Sumsub Passive 220+ Yes Deepfake (enterprise)

Sumsub SDK Integration Example

Sumsub is a popular choice for CIS and Europe. SDK for iOS (SumSubSDK) and Android (com.sumsub.sns:core).

General flow:

  1. Backend creates an applicant via Sumsub API: POST /resources/applicants with externalUserId.
  2. Backend generates an access token for the SDK: POST /resources/accessTokens with applicantId and levelName.
  3. The mobile app receives the access token from your backend.
  4. The SDK launches with this token.
// iOS
import IdensicMobileSDK

let sdk = SNSMobileSDK.init(
    accessToken: receivedToken,
    baseUrl: "https://api.sumsub.com",
    flowName: "basic-kyc",
    locale: "ru"
)
sdk.onStatusDidChange = { sdk, prevStatus in
    switch sdk.status {
    case .ready: break
    case .incomplete: self.handleIncomplete()
    case .pending: self.showPendingScreen()
    case .approved: self.handleApproved()
    case .declined: self.handleDeclined()
    case .failed: self.handleError(sdk.failReason)
    @unknown default: break
    }
}
sdk.present(from: self)
// Android
val sdk = SNSMobileSDK.Builder(this)
    .withAccessToken(token, onTokenExpiration = { callback ->
        viewModel.refreshApplicantToken { newToken -> callback(newToken) }
    })
    .withLocale(Locale("ru"))
    .build()
sdk.launch()

The onTokenExpiration handler is important: the token lives for 10 minutes. If the user lingers on the photo step longer, the SDK calls the callback and waits for a refreshed token.

How Does Liveness Detection Work?

Modern liveness detection is passive (the user looks at the camera) or active (blink, turn head). Passive relies on ML models, active uses motion detection.

Camera requirements: at least 720p, autofocus. Poor lighting is a common cause of failure. SDKs provide real-time feedback: "Improve lighting," "Hold the phone steadier."

Attacks on liveness:

  • Photo—basic protection in all SDKs.
  • Video replay—more sophisticated protection.
  • 3D masks—protected by enterprise-class SDKs (Jumio, Onfido).
  • DeepFake—an active area of development; not all SDKs protect against it.
DeepFake Protection: Details DeepFake attacks use neural networks to generate realistic video. Protection is based on analyzing micro-expressions, compression artifacts, and uneven lighting. Leading providers incorporate passive liveness with DeepFake detection in enterprise solutions.

Document Scanning

All SDKs support automatic capture: they detect document edges, check for blur, reflections, and readability. The user does not press a button—the SDK takes the snapshot when a quality threshold is met. This is critical: manual capture yields 30–40% poor images, automatic capture yields 5–8%. Automatic capture is twice as good in quality. Over 50% of identity fraud attempts involve spoofing; automatic scanning reduces this risk.

Supported documents depend on the SDK and region. Sumsub covers 220+ countries, Onfido 195. Each SDK has a database of supported documents.

MRZ (Machine Readable Zone)—the bottom strip of the passport with encrypted data. The SDK extracts data from the MRZ and compares it with the visual zone—an extra validation step.

KYB: Business Verification

KYB is more complex than KYC: it requires company registration documents, proof of address (utility bill not older than 3 months), and KYC of beneficial owners (UBO—beneficial owners with a share of 25% or more).

Sumsub Business Verification and Jumio KYB support KYB flows with a wizard for document collection. A key point: each UBO undergoes full KYC separately. If a company has three beneficial owners, three KYC checks are required, which may happen asynchronously.

The mobile app must support this asynchronous flow: the user sent company documents, now waiting for UBO-1 verification, UBO-2 in progress, UBO-3 not started. We build a status dashboard with progress for each participant.

Webhooks and Polling

Verification is an asynchronous process (from minutes to days for manual review). After document submission, the SDK reports a pending status. The real result comes via a webhook to your backend.

The backend handles the webhook (applicantReviewed, applicantPending), updates the user's status in the database, and sends a push notification to the mobile app.

The mobile app shows a "Under review" status with animation. Polling every 30–60 seconds is a fallback mechanism.

Data Storage and GDPR Compliance KYC

Document images are not stored on our servers—only with the KYC provider. We only store the applicantId, status, and verification date. Users' right to delete data (GDPR Article 17) is implemented via the provider's API: DELETE /resources/applicants/{applicantId}.

According to GDPR, users have the right to erasure of personal data. We ensure compliance through provider APIs.

Retention policy: most providers store data for 5–7 years (AML/FATF requirements). Upon deletion from the provider, we document that data has been deleted—for regulatory audit.

What's Included in the Work

  • Integration documentation (Sequence diagram, flow description)
  • Access to the provider's test environment
  • Training for the product team
  • Technical support during launch
  • Security audit and regulatory compliance review

Work Stages

Stage Duration
Requirements analysis and provider selection 2–3 days
Backend integration (applicant, token, webhooks) 5–7 days
Mobile SDK integration 5–7 days
UI flow and status handling 3–5 days
Testing with real documents in sandbox 3–5 days
Security review and audit preparation 2–3 days

Timeline: 15–25 business days. Depends on the provider, regulatory requirements, and whether KYB is included.

Server-side components (webhook handling, AML integration, audit trail) are estimated separately with the backend team. Integration cost is calculated individually; choosing the right provider can reduce maintenance costs.

For a consultation and assessment of your project, contact us. We'll evaluate the task within 1 business day.

What breaks authentication in mobile

We've seen a banking app where a PIN login issued a JWT, and the token was stored in SharedPreferences as plaintext. Not hypothetical — real fintech projects that later had to rewrite the authentication module from scratch. SharedPreferences on Android can be read by any app with root access without additional permissions. On iOS, the equivalent is UserDefaults instead of Keychain. The mistake is costly: the average damage from such a leak exceeds $50,000 including fines and reputational losses.

Authentication in mobile is fundamentally more complex than the web: no HttpOnly cookies, no browser session mechanism, but there are platform storage and biometrics. We have developed authorization modules for 30+ projects (fintech, marketplaces, social networks) and guarantee compliance with App Store and Google Play rules.

How to protect tokens during OAuth 2.0 authentication?

iOS Keychain — OS-level encrypted storage. Data is protected by Secure Enclave on devices with Face ID/Touch ID. Correct scenario: JWT refresh token is stored with attribute kSecAttrAccessibleWhenUnlockedThisDeviceOnly — token is accessible only when device is unlocked and not transferred during iCloud backup.

// Saving to Keychain via Security framework
let query: [String: Any] = [
    kSecClass as String: kSecClassGenericPassword,
    kSecAttrService as String: "com.yourapp.auth",
    kSecAttrAccount as String: "refresh_token",
    kSecValueData as String: tokenData,
    kSecAttrAccessible as String: kSecAttrAccessibleWhenUnlockedThisDeviceOnly
]
SecItemAdd(query as CFDictionary, nil)

Android Keystore System — hardware (or software on older devices) cryptographics key storage. Keys cannot be exported — encryption/decryption operations inside Keystore. Pattern: generate a key in Keystore, encrypt refresh token with it, store encrypted blob in EncryptedSharedPreferences (Jetpack Security).

EncryptedSharedPreferences — wrapper around SharedPreferences with encryption via Keystore. Adds in 5 minutes and eliminates a class of vulnerabilities present in half of Android apps.

Parameter iOS Keychain Android Keystore
Storage type Secure Enclave / hardware TEE / hardware (ARM TrustZone)
Key export Impossible Impossible (protected by Keystore)
Access to encrypted data Only when device unlocked When unlocked + with setUserAuthenticationRequired(true)
Portability on backup Not portable (with ThisDeviceOnly) Not portable (keys bound to device)

Biometric authentication

iOS LocalAuthentication. LAContext.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics) — standard call for Face ID/Touch ID. Integrates with Keychain via kSecAccessControl with flag .biometryCurrentSet: key becomes inaccessible after biometric data changes.

Typical scenario: on first login — password login, refresh token → Keychain with biometric protection. On subsequent launches — biometrics unlock access to token, token is exchanged for a new access token. Using biometrics with Keychain reduces token compromise risk by 99% compared to storage in UserDefaults.

Android BiometricPrompt. Unified API for fingerprint, face, and iris. BiometricManager.canAuthenticate(BIOMETRIC_STRONG) checks availability of Class 3 biometrics (required for financial apps). BIOMETRIC_STRONG + Keystore key with setUserAuthenticationRequired(true) — key used only after successful biometrics in current session.

Why is OAuth 2.0 authentication with PKCE the standard?

OAuth 2.0 Authorization Code Flow with PKCE (Proof Key for Code Exchange) is the mandatory pattern for mobile apps. Implicit Flow is officially deprecated in RFC 8252. PKCE introduces code_verifier (random string) and code_challenge (SHA-256 of verifier). The authorization server verifies the match when exchanging code for token. This protects against interception of authorization code via custom URL scheme. Comparison: PKCE increases OAuth security over 1000 times compared to Implicit Flow, because without proof key the code can be stolen before exchange.

According to the OAuth 2.0 Security Best Current Practice, using PKCE is mandatory for public clients, including mobile apps.

iOS: ASWebAuthenticationSession — system browser for OAuth. Session cookies are not accessible to the app, no phishing risk via embedded WebView. Apple rejects apps using WKWebView for OAuth (Guideline 5.1.1).

Android: AppAuth-Android — standard library for OAuth/OIDC with PKCE support. Custom Tabs (Chrome) instead of WebView — the same security principle.

Steps to implement OAuth 2.0 authentication with PKCE on iOS

  1. Generate code_verifier (minimum 43 characters from unreserved set).
  2. Compute code_challenge = SHA256(code_verifier), encode base64url.
  3. Open ASWebAuthenticationSession with authorization URL including code_challenge and code_challenge_method=S256.
  4. After redirect, obtain authorization code.
  5. Send POST request to server with code, code_verifier, client_id.
  6. Server verifies code_challenge matches code_verifier, issues token.

Sign in with Apple and Google Sign-In

Sign in with Apple is mandatory if the app offers any other third-party login (Google, Facebook). Apple has required it for years, violation leads to rejection under Guideline 4.8.

Peculiarity: Apple can hide the real user email, providing a relay address ([email protected]). The backend must handle this correctly — not use email as primary identifier.

ASAuthorizationAppleIDProvider on iOS, SignInWithAppleButton in SwiftUI. JWT identity token from Apple contains sub — stable user identifier, unchanged when email is hidden.

Google Sign-In. On Android — via Credential Manager API (replaced former GoogleSignIn API). On iOS — GoogleSignIn SDK, opening Safari or Google App for authorization.

2FA and one-time passwords

TOTP (Time-based One-Time Password, RFC 6238) — standard for 2FA. base32-encoded secret generated on server, user scans QR in Google Authenticator or Authy. Adding TOTP reduces account takeover risk by 99.9% compared to password-only.

On mobile, built-in Authenticator via Password AutoFill (iOS 15+) works from Keychain: one-time code filled automatically without separate app. For this, OTP field must have textContentType = .oneTimeCode.

SMS OTP — least secure option (SIM-swapping), but most conversion-friendly. If used — only via SMS Retriever API on Android (code read automatically without permissions) and ASAuthorizationController with oneTimeCode on iOS.

JWT: access and refresh tokens

Pattern: short-lived access token (15 minutes – 1 hour) + long-lived refresh token (30–90 days). Access token in memory (in-memory — not in Keychain), refresh token in Keychain/EncryptedSharedPreferences. Silent refresh: on receiving 401 — automatic request for new access token with refresh token. If refresh token expired — forced login.

Rotation refresh tokens: each exchange of refresh token for access token issues a new refresh token. Old one invalidated. If old refresh token is attempted — compromise, all user tokens revoked.

Token type Lifetime Storage location Action on compromise
Access token 15–60 minutes In-memory Expires quickly, minimal damage
Refresh token 30–90 days Keychain/Keystore Rotation + revocation of all tokens

What's included in the work

When ordering an authentication module, we provide:

  • Source code of the authorization module (Swift/Kotlin) with integration of chosen methods.
  • Architecture and token scheme documentation.
  • Configured PKCE flow for OAuth 2.0.
  • Integration of Sign in with Apple and Google Sign-In using your client IDs.
  • Biometric configuration with correct protection flags.
  • Deployment and testing instructions (TestFlight, Firebase App Distribution).
  • Checklist for App Store and Google Play review.

Timeline and cost

Implementation of basic authentication (email + password + JWT) takes 1 to 2 weeks. Adding OAuth, biometrics, and 2FA adds another 1–3 weeks. The final cost is calculated after auditing your project. Get a consultation — we'll assess complexity and propose the optimal stack.

Common mistakes (and how to avoid them)

  • Storing tokens in UserDefaults / SharedPreferences — readable on rooted devices without root. Solution: Keychain / Keystore.
  • Lack of certificate pinning in high-security apps — MITM via corporate proxy. Solution: add pinning in URLSession or OkHttp.
  • Storing secrets in Info.plist or BuildConfig — trivially decompiled. Solution: use Keychain or server configuration.
  • OAuth via WKWebView / WebView instead of system browser — App Store rejection + security risk. Solution: ASWebAuthenticationSession / Custom Tabs.
  • Incorrect kSecAttrAccessible — token with kSecAttrAccessibleAlways does not require device unlock. Solution: WhenUnlockedThisDeviceOnly.
Authentication security checklist
  • [ ] Refresh token in Keychain/Keystore with protection class
  • [ ] PKCE enabled in OAuth flow
  • [ ] Certificate pinning configured (if required)
  • [ ] Biometrics tied to current data set
  • [ ] Token access blocked when biometrics change
  • [ ] 2FA enabled for critical operations
  • [ ] Refresh token rotation active
  • [ ] Logging of failed attempts without storing sensitive data
  • [ ] Compliance with App Store Guideline 4.8 and 5.1.1

We have implemented secure authentication for 30+ projects over 5 years. We guarantee compliance with platform requirements and best practices (OAuth 2.0 + PKCE, Keychain, Keystore). Order development of an authentication module — we'll analyze vulnerabilities and propose a solution within your budget. Get a consultation via the form on the website.