Mifos-Passcode-CMP is a secure and flexible App Lock library built using Kotlin Multiplatform and Jetpack Compose Multiplatform (CMP). It enables developers to easily integrate passcode-based authentication along with biometric authentication (such as fingerprint or face recognition) into cross-platform applications using a shared codebase.
Designed with modularity and security in mind, this library is a foundational part of the Mifos mobile ecosystem and is suitable for any Kotlin Multiplatform project where secure access control is required.
See LOCALIZATION.md for bundled locales and how to switch language at runtime.
| Platform | Passcode | Platform Authenticator |
|---|---|---|
| Android | ✅ Supported | ✅ Supported |
| iOS | ✅ Supported | ✅ Supported |
| macOS | ✅ Supported | |
| Windows 10+ | ✅ Supported | ✅ Supported |
| Linux | ✅ Supported | |
| Web | ✅ Supported |
The project is organized into several modules to ensure a clear separation of concerns and to facilitate multiplatform development:
build-logic: Contains Gradle convention plugins used to standardize build configurations across all modules (linting, static analysis, multiplatform setup).mifos-authenticator-passcode: A Compose Multiplatform library providing the logic and UI components for passcode authentication.mifos-authenticator-biometrics: A library providing platform-specific implementations for device authentication (Biometrics, Windows Hello, WebAuthn).cmp-sample-shared: Contains the shared business logic, navigation, and UI for the sample applications.cmp-sample-android: The Android entry point for the sample application.cmp-sample-ios: The iOS entry point for the sample application.cmp-sample-desktop: The Desktop (JVM) entry point for the sample application.cmp-sample-web: The Web (Wasm & JS) entry point for the sample application.
commonMain/: Platform-agnostic interface and provider for device authentication.androidMain/: Implementation using AndroidBiometricPrompt.iosMain/: Implementation using iOSLocalAuthentication.desktopMain/: Implementation using JNA for Windows Hello (on Windows) and placeholders for other desktop platforms.jsMain//wasmJsMain/: Implementation using the Web Authentication API (WebAuthn).
commonMain/: Contains thePasscodeManager,PasscodeStorageAdapter, and thePasscodeScreenUI built with Compose Multiplatform.
commonMain/: Defines the shared UI, themes, and navigation logic. It integrates both the passcode and biometric modules to demonstrate a complete authentication flow.