Skip to content

TheKalpeshPawar/mifos-passcode-cmp

 
 

Repository files navigation

Android Client

Mifos-Passcode-CMP

Mifos-Passcode-CMP is a secure and flexible passcode management 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.

Kotlin Kotlin Multiplatform Compose Multiplatform

badge-android badge-ios badge-macos badge-windows badge-linux badge-web

PR Checks Slack


✅ Supported Platforms

Platform Support Status
Android ✅ Supported
iOS ✅ Supported
macOS ✅ Supported
Windows 10+ ✅ Supported
Linux ✅ Supported
Web ✅ Supported

📁 Project Structure

mifos-passcode-cmp

Core library module containing shared and platform-specific implementations:

  • commonMain/
    • Platform-agnostic passcode and biometric logic (ViewModels, shared logic).
  • <platform>Main/ – Platform-specific implementations for biometric authentication via native interop:
    • androidMain/
    • iosMain/
    • macosMain/
    • windowsMain/
    • linuxMain/
    • webMain/

sample

Cross-platform sample implementation of the passcode screen UI:

  • commonMain/ – Shared passcode screen logic using Compose Multiplatform.
  • <platform>Main/ – Platform-specific UI wiring for the passcode screen.

For a basic implementation of the PassCode Screen

  • Import PasscodeScreen to your project which has 4 parameters mentioned below:
    • onForgotButton: This will allow to handle the case when the user isn't able to log into the app. In our project we are redirecting the user to login page
    • onSkipButton: This offers users the flexibility to bypass the passcode setup process, granting them immediate access to the desired screen
    • onPasscodeConfirm: This allows you to pass a function that accepts a string parameter
    • onPasscodeRejected: This can be used to handle the event when user has entered a wrong passcode

Screenshots

Mobile

Desktop and web


About

Passcode library for compose multi-platform project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%