[MW-225] feat(auth): Implement full Sign In & Sign Up flow with validation#1872
[MW-225] feat(auth): Implement full Sign In & Sign Up flow with validation#1872niyajali merged 11 commits intoopenMF:developmentfrom
Conversation
…le error messages for all user actions
|
@niyajali could you please have a look here |
There was a problem hiding this comment.
@HekmatullahAmin Fetch Country & State from server and show as drop-down if any API available otherwise create a list of country and state and show as drop-down.
And instead of dialog for password feedback show a card below of the password indicator which should contain list of password feedback.
|
And update the PR title like |
feature/auth/src/commonMain/kotlin/org/mifospay/feature/auth/signup/SignupScreen.kt
Outdated
Show resolved
Hide resolved
feature/auth/src/commonMain/kotlin/org/mifospay/feature/auth/signup/SignupScreen.kt
Outdated
Show resolved
Hide resolved
feature/auth/src/commonMain/kotlin/org/mifospay/feature/auth/signup/Country.kt
Show resolved
Hide resolved
feature/auth/src/commonMain/kotlin/org/mifospay/feature/auth/signup/SignupViewModel.kt
Show resolved
Hide resolved
feature/auth/src/commonMain/kotlin/org/mifospay/feature/auth/signup/SignupViewModel.kt
Outdated
Show resolved
Hide resolved
feature/auth/src/commonMain/kotlin/org/mifospay/feature/auth/signup/SignupViewModel.kt
Outdated
Show resolved
Hide resolved
…state support in signup flow
|
@niyajali can you have a look at here i created the interface if the want the data from json then they can create a function accordingly |
core/designsystem/src/commonMain/kotlin/org/mifospay/core/designsystem/component/TextField.kt
Outdated
Show resolved
Hide resolved
core/designsystem/src/commonMain/kotlin/org/mifospay/core/designsystem/component/TextField.kt
Outdated
Show resolved
Hide resolved
core/ui/src/commonMain/kotlin/org/mifospay/core/ui/MifosPasswordField.kt
Show resolved
Hide resolved
feature/auth/src/commonMain/kotlin/org/mifospay/feature/auth/signup/SignupScreen.kt
Outdated
Show resolved
Hide resolved
|
@niyajali just wanted to clarify the UX expectations here: Would you prefer:
|
|
@HekmatullahAmin What type of validation we had earlier |
@niyajali previously it was only dialog if someone click submit it was showing the field must not be empty |
|
@HekmatullahAmin Okay so currently you're passing some errorMessage on the text field initially, and what is that message |
yes the message are all like this field cannot be empty. and will only show if they are empty and is focusable, so if the go to another field it shouldn't show. if not focusable and the user visit the sign up screen for the first time all of those fields is going to look red with their error message. do you want me to keep it or revert it back to before or u want sth else? |
|
Those error messages we're showing on the dialog right, so do not need it, revert to the original |
|
@niyajali I revert it and also removed the isError from composables in SignUp Screen. Previously it was passed from the SignUp screen checking if those were empty but in
|
core/data/src/commonMain/kotlin/org/mifospay/core/data/repositoryImp/AssetRepositoryImpl.kt
Outdated
Show resolved
Hide resolved
core/data/src/commonMain/kotlin/org/mifospay/core/data/repositoryImp/AssetRepositoryImpl.kt
Outdated
Show resolved
Hide resolved
core/data/src/commonMain/kotlin/org/mifospay/core/data/repositoryImp/AssetRepositoryImpl.kt
Outdated
Show resolved
Hide resolved
|
@niyajali i revert those changes just one thing more how you want the behavious of
@biplab1 thanks for pointing i will fix the typos |
|
As we've created the indicator card those are only visible when the focus state has been changed. |
|
@niyajali added the neccessary changes if looks good approve and merge |
|
@biplab1 could u please resolve your requested changes and approve |
feature/auth/src/commonMain/kotlin/org/mifospay/feature/auth/signup/SignupScreen.kt
Outdated
Show resolved
Hide resolved
feature/auth/src/commonMain/kotlin/org/mifospay/feature/auth/signup/SignupViewModel.kt
Outdated
Show resolved
Hide resolved
core/model/src/commonMain/kotlin/org/mifospay/core/model/utils/Country.kt
Show resolved
Hide resolved
|
@itsPronay , @revanthkumarJ , @biplab1 when u are available have a look and resolve your conversation and kindly approve |

Jira Task: MW-225
Screenshots
SignIn.SignUp.mp4
Description
What’s Achieved in This PR
Covers both happy and unhappy user journeys.
Seamlessly transitions from input to account creation and navigation.
Ensures mandatory fields like name, email, and mobile number are filled.
Email is checked for correct format.
Password and confirm password must match.
All validation and API errors are now clearly presented to the user.
Replaced generic or null messages with user-friendly alternatives.
Handles unique field validation (username and mobile) with clear feedback.
A help card shows password rules inline before submission.
Prevents trial-and-error by guiding users upfront.
Removed strict 6-digit requirement for pin codes.
Allows shorter lengths to support different country formats (e.g., 4- or 5-digit codes).
Integrated stefanbinder/countries-states JSON for populating country-state mapping.
Countries and their respective states are loaded from countries.json and rendered as dropdowns in the signup form.
Apply the
AndroidStyle.xmlstyle template to your code in Android Studio.Run the unit tests with
./gradlew checkto make sure you didn't break anythingIf you have multiple commits please combine them into one commit by squashing them.