EmbeddedChat icon indicating copy to clipboard operation
EmbeddedChat copied to clipboard

Show error toast message for failed login attempt.

Open abhinavkrin opened this issue 2 years ago • 7 comments

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

abhinavkrin avatar Jan 18 '24 11:01 abhinavkrin

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

Akshun-01 avatar Jan 18 '24 11:01 Akshun-01

Sure @Akshun-01 ! Waiting for your PR

abhinavkrin avatar Jan 18 '24 11:01 abhinavkrin

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

Yashraj7890 avatar Jan 18 '24 13:01 Yashraj7890

@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 avatar Jan 18 '24 14:01 Spiral-Memory

@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 avatar Jan 18 '24 14:01 Spiral-Memory

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

Spiral-Memory avatar Jan 18 '24 15:01 Spiral-Memory

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

Yashraj7890 avatar Jan 18 '24 15:01 Yashraj7890