RocketChat / EmbeddedChat

An easy to use full-stack component (ReactJS) embedding Rocket.Chat into your webapp
https://rocketchat.github.io/EmbeddedChat/docs
112 stars 222 forks source link

Show error toast message for failed login attempt. #407

Open abhinavkrin opened 7 months ago

abhinavkrin commented 7 months ago

The login modal should show a toast message with an appropriate message in case of login failure.

Akshun-01 commented 7 months ago

I would like to work on this, if its free!

abhinavkrin commented 7 months ago

Sure @Akshun-01 ! Waiting for your PR

Yashraj7890 commented 7 months ago

Hey @abhinavkrin Is this issue assigned particularly or we could make PRs independently

Spiral-Memory commented 7 months ago

@abhinavkrin, Regarding the toast error when login fails, it is already present in the frontend code when the 'Unauthorized' tag is returned from the server. The reason it is not visible is that the Embeddedchat API is not returning the correct error tag. The issue is already addressed in my pull request, which you requested a review for: https://github.com/RocketChat/EmbeddedChat/pull/401. You can watch my uploaded video to see that this also works there just after correcting server response. The problems, such as the 2FA modal not opening and the login error not showing, are related to the server response, and I have handled all such issues in the pull request.

Spiral-Memory commented 7 months ago

@abhinavkrin , See, in rcAuth on frontend, all of the logic is already written in the existing code, it is unable to show because server was not returning correct response that is needed on frontend. The PR i raised automatically solves many issues like of 2FA OTP entry, OTP invalid toast message, login failed toast message etc as it addresses the server response which is the root cause of this issue.

image

Spiral-Memory commented 7 months ago

Hey @Akshun-01 @Yashraj7890, I request you to please wait until further confirmation from Abhinav before starting to work on this issue.

Yashraj7890 commented 7 months ago

Sure @Spiral-Memory I'm waiting for confirmation from @abhinavkrin