{"id":25144444,"url":"https://github.com/openmf/mifos-passcode","last_synced_at":"2025-06-17T10:33:38.253Z","repository":{"id":28131956,"uuid":"116408172","full_name":"openMF/mifos-passcode","owner":"openMF","description":"Library for passcode generation on different mobile apps. ","archived":false,"fork":false,"pushed_at":"2025-03-29T20:14:47.000Z","size":2213,"stargazers_count":17,"open_issues_count":34,"forks_count":36,"subscribers_count":9,"default_branch":"development","last_synced_at":"2025-04-28T11:21:31.626Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openMF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-01-05T17:06:47.000Z","updated_at":"2025-03-29T20:14:51.000Z","dependencies_parsed_at":"2022-07-27T12:32:28.809Z","dependency_job_id":"55b5d9ca-4c50-4736-a0bc-369f038c7f17","html_url":"https://github.com/openMF/mifos-passcode","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/openMF/mifos-passcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openMF%2Fmifos-passcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openMF%2Fmifos-passcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openMF%2Fmifos-passcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openMF%2Fmifos-passcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openMF","download_url":"https://codeload.github.com/openMF/mifos-passcode/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openMF%2Fmifos-passcode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260340150,"owners_count":22994425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-08T19:46:22.044Z","updated_at":"2025-06-17T10:33:33.221Z","avatar_url":"https://github.com/openMF.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mifos-Passcode\nLibrary for passcode implementation along with an optional additional feature to ask for passcode when your app resumes from background. (Works with minSDK \u003e= 21)\n\n# Project Structure :\n\n- **`androidApp` Module**:\n  - Contains the Android-specific application code.\n  - Depends on the `shared` module to utilize common code across platforms.\n\n- **`iosApp` Module**:\n  - Holds the iOS-specific application code.\n  - Integrates the `shared` module, typically as a framework, to access shared logic.\n\n- **`shared` Module**:\n  - The core module containing platform-agnostic code, including business logic and Compose Multiplatform UI components.\n  - Referenced by both `androidApp` and `iosApp` modules to promote code reuse.\n\n- **`cmp-mifos-passcode` Module**:\n  - A specialized module designed to package and publish the `shared` module as a Compose Multiplatform (CMP) library.\n  - Facilitates the distribution and reuse of the shared codebase across different projects or teams.\n\n\nUsage\n-----\n\nIn order to use the library\n\n**1. Gradle dependency**\n\n  -  Add the following to your project level `build.gradle`:\n\n```gradle\nallprojects {\n\trepositories {\n\t\tjcenter()\n\t}\n}\n```\n  -  Add this to your app `build.gradle`:\n\n```gradle\ndependencies {\n\timplementation 'com.github.openMF.mifos-passcode:compose:1.0.3'\n}\n```\n\n## Example\n\n## Android Implementation:\n\nhttps://github.com/user-attachments/assets/a93781d1-13b6-4c48-a2c1-2021ca56fd0b\n\n## IOS Implementation : \n\nhttps://github.com/user-attachments/assets/9267d7ad-1e95-4212-8f5b-4516413e8b5d\n\nFor a basic implementation of the PassCode Screen\n- Inject the `PasscodeRepository` in your activity which is essentially abstracting the operations related to saving, retrieving, and validating the passcode\n- Import `PasscodeScreen` to your project which has 4 parameters mentioned below:\n  - `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\n  - `onSkipButton`: This offers users the flexibility to bypass the passcode setup process, granting them immediate access to the desired screen\n  - `onPasscodeConfirm`: This allows you to pass a function that accepts a string parameter\n  - `onPasscodeRejected`: This can be used to handle the event when user has entered a wrong passcode\n\n- This is how a typical implementation would look like\n\n```kotlin\n    @Inject\n    lateinit var passcodeRepository: PasscodeRepository\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContent {\n            MifosPasscodeTheme {\n                PasscodeScreen(\n                    onForgotButton = {},\n                    onSkipButton = {},\n                    onPasscodeConfirm = {},\n                    onPasscodeRejected = {}\n                )\n            }\n        }\n    }\n```\n- You can now define functions of your own and pass them to their respective fields. You can find the entire implementation in the `PasscodeActivity` of `:app` module\n\n## Screenshots\n- Here are some screenshots of the app\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"https://github.com/openMF/mifos-passcode/assets/90026952/34cf73fd-68dc-4f6b-915b-690310238b10\" width=250 height=510\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://github.com/openMF/mifos-passcode/assets/90026952/e01c0357-9bd2-4472-b2c1-3826be89cd8c\" width=250 height=510\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"https://github.com/openMF/mifos-passcode/assets/90026952/377d83da-1956-45c6-96c1-7befbf545264\" width=250 height=510\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmf%2Fmifos-passcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenmf%2Fmifos-passcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmf%2Fmifos-passcode/lists"}