"Wrong email or password" error.
How To Reproduce
- Navigate to the Login Screen
- Tap the Login Button
- In the Login Dialogue:
- Enter a valid email address in the "Email" field.
- Enter an incorrect password in the "Password" field.
- Tap the Login button.
- Observe the system displaying the error message: "Wrong email or password".
- Tap the cancel button, and the dialogue dismisses.
- Tap the Login Button again.
- The system shows the dialogue message "Wrong email or password"
Expected Result:
The "Wrong email or password" error message should not be displayed again immediately.
The application should either: Attempt a new login with the existing (incorrect) credentials. Clear the error state and allow the user to enter new credentials without the error message reappearing. Actual Result:
The "Wrong email or password" error message is displayed again immediately, even though the user has not yet entered new credentials.
Hi! I’d love to help resolve the error message persistence issue.
Proposed Approach:
Reset the error state when the login dialog closes to prevent the message from reappearing unnecessarily.
Ensure the error only displays after new credentials are submitted.
I can implement this by modifying the dialog’s state management logic
Hi @Aden1ke
Welcome to CBOARD. We are glad to have your help with this project.
Please check the following folder
'cboard/src/components/Account/Login'
Login action and Login component are the files. Login.action contains the logic, and "Login.component" includes the design.
Hello @gonojuarez , Sorry for the delay in replying. I'm currently facing an issue with the development mode,the localhost opens, but the app doesn't run. I'm working on figuring out the problem.
@Aden1ke, run the following commands to download the app:
to download the packages: yarn
after that :
yarn start
The local host project should be run with this command.
When you arrive at the login page, you must use the cboard-api to run the login functions. Check only the logic that receives the message, and when it changes without the API.
Let us know if you can run it without that.
I did just this, the yarn start opened a local host page. But the page is not working, I want to check if it is from my end
@Aden1ke can you check the message in the console?
It shows this at first but goes ahead to open local host automatically, but the local page it opens does not load
@Aden1ke run the command
npx update-browserslist-db@latest
Hello,
I have tried it, it's not going I even had to make research. I am not sure why?
@Aden1ke I will try to download it in a new fork and complete the steps to guide and run it.
Hello @Aden1ke welcome to the Cboard project. I need more information about your problem to be able to help you. My terminal shows:
PS C:\Users\rodri\CBOARD\cboard> yarn start
yarn run v1.22.19
$ craco start
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
(node:6200) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:6200) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...
Compiled successfully!
You can now view cboard in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.56.1:3000
Note that the development build is not optimized.
To create a production build, use yarn build.
webpack compiled successfully
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
No issues found.
Please double check if you have the same logs. Also please share the web console logs
I will appreciate that, thank you.
Sorry for the trouble
It starts development, automatically opens localhost but never loads it finish or tell me successful
Okay! Send me a message on Discord! .rodrisanchez or send on the dev thread of Cboard Discord
Message sent
Hello , I’m interested in working on this issue.
I’d love to contribute — could you please assign it to me?
Hi! @suryavamsi1729 Welcome to the Cboard project!
Sure thing! I will assing it to you
@RodriSanchez1 I have a solution for this and can put up a PR. Also the same issue exists for ResetPassword, and the solution is the same. Would you consider expanding the scope here?
https://github.com/user-attachments/assets/11efbccf-431b-40b6-a9f5-55d99b13f359
cc @tomivm
@zkarmi Sure thing! I will assign it to you. Be free to expand the scope
EDIT: As tomi said on the Discord channel. We normally we prefer to have the PRs much "atomic" as possible With the objetive to review the minimum changes necessaries to have a fast integration and easy reverts
Take that on mind. If you consider that is possible two solve the issue in two different atomics PR let do that, if not create just one PR.
@RodriSanchez1 Thank you for assigning.
The issue is that in the Login and ResetPassword components the loginStatus and forgotState state variables are not reset when the Dialog is closed because the handler only calls WelcomeScreen.resetActiveView, which simply sets the Dialog components' open prop to false. The Login and ResetPassword components themselves don't unmount, so the errors are never cleared.
Fortunately, the SignUp component already uses componentDidMount to reset the error state if the dialog goes from closed to open:
https://github.com/cboard-org/cboard/blob/2824ecf9f7749a5fe55a5af39dce66b2675663ac/src/components/Account/SignUp/SignUp.component.js#L40-L44
My plan is to replicate the behavior for the Login and ResetPassword components. I can do two PRs, one for each.
For a more readable/DRY implementation, we can extract the logic into a helper, if you have a recommendation where that could live.
That's awesome!
Since these are all small changes, it would be easier if you could include them in the same PR. Let’s also keep things simple and handle the logic directly in componentDidUpdate, without introducing a separate helper for now.
Thanks a lot for your contributions