Added error handling as requested on issue on Github #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the need for better error handling during the login process, as discussed in issue #37. The changes introduced here aim to provide clear, user-friendly feedback for various authentication errors returned by Firebase during login attempts.
Changes:
onLoginFormSubmit
function within theuseLoginScreen
hook.auth/invalid-email
: Informs the user that the email address format is incorrect.auth/wrong-password
: Alerts the user that the entered password is incorrect.auth/user-not-found
: Notifies the user when there is no account associated with the entered email.These messages are displayed directly on the
LoginScreen
, enhancing the user experience by providing immediate, relevant feedback for correction or understanding of the issue at hand.Motivation:
The need for clearer error messages was highlighted in issue #37 where it was noted that users were facing difficulties understanding the reasons behind authentication failures. This enhancement aims to resolve this by explicitly handling each error scenario.
Testing:
This update should make the login process more intuitive and less frustrating for users by clearly communicating what needs to be fixed or what issue might have occurred. Please review the changes and let me know if further modifications are required.
Thank you!
Overview 🚀
Give the brief about your changes
How Has This Been Tested? 🚨
Screenshots 📸
Checklist ✅
My code follows the style guidelines of this project
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
Any dependent changes have been merged & published in downstream modules