The embedded chat application encounters difficulties when 2FA is activated, preventing users from logging in and disrupting the authentication process. Additionally, it is necessary to ensure the display of accurate error messages for all types of login errors.
Steps to reproduce:
Set up the embedded chat application as per the provided documentation and access the embedded chat Storybook.
Enable Two-Factor Verification in the admin workspace through the Rocket Chat application.
Launch the embedded chat application and try to log in.
Expected behavior:
When 2FA is activated, a modal should appear for OTP entry. The system will then validate the OTP; if incorrect, a corresponding message should be displayed, and if correct, the user should be logged in seamlessly. Upon receiving a "totp-required" tag from the Rocket Chat backend, it is crucial to ensure proper propagation of this error to the frontend through the auth and embedded chat API.
Actual behavior:
In this case, No message is presented to the user, and the modal fails to open, preventing the user from logging in. In the console, an incorrect error is printed, indicating that the API returned an "Unauthorized" tag, which does not accurately reflect the actual error provided by the Rocket Chat backend API.
Description:
The embedded chat application encounters difficulties when 2FA is activated, preventing users from logging in and disrupting the authentication process. Additionally, it is necessary to ensure the display of accurate error messages for all types of login errors.
Steps to reproduce:
Expected behavior:
When 2FA is activated, a modal should appear for OTP entry. The system will then validate the OTP; if incorrect, a corresponding message should be displayed, and if correct, the user should be logged in seamlessly. Upon receiving a "totp-required" tag from the Rocket Chat backend, it is crucial to ensure proper propagation of this error to the frontend through the auth and embedded chat API.
Actual behavior:
In this case, No message is presented to the user, and the modal fails to open, preventing the user from logging in. In the console, an incorrect error is printed, indicating that the API returned an "Unauthorized" tag, which does not accurately reflect the actual error provided by the Rocket Chat backend API.
https://github.com/RocketChat/EmbeddedChat/assets/78961432/d6cdd12f-db21-4f68-9f32-5eb1a56e0629