Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Wrong message when resetting password and 2FA is enabled #8489

Merged
merged 1 commit into from
Oct 14, 2017

Conversation

rodrigok
Copy link
Member

@rodrigok rodrigok commented Oct 14, 2017

@RocketChat/core

Closes #8472

When password is reset the user is logged in automatically, but one error is received when the user has 2FA enabled requiring to pass the token, that is why we have the password reset but one error is displayed.

This PR just check the error message and redirect the user to the login page when 2FA is required and show a success alert about the message reset.

The 2 possible results are:

  • 2FA Disabled: After a successful password reset the user will be logged in automatically
  • 2FA Enabled: After a successful password reset the user will receive a successful message and will be redirect to the login page

@rodrigok rodrigok added this to the 0.59.0-rc.13 milestone Oct 14, 2017
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-8489 October 14, 2017 18:30 Inactive
@rodrigok rodrigok modified the milestones: 0.59.0-rc.13, 0.59.0-rc.14 Oct 14, 2017
title: t('Error_changing_password'),
type: 'error'
});
if (error.error === 'totp-required') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it throw this error even if successfully changing password?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, cuz after the change the process proceed to login, then we receive this error, if password was not changed the error will be different

@rodrigok rodrigok merged commit b9d119f into develop Oct 14, 2017
@rodrigok rodrigok deleted the hotfix/reset-password-message-with-2fa branch October 14, 2017 20:31
rodrigok added a commit that referenced this pull request Oct 17, 2017
…e-with-2fa

[FIX] Wrong message when reseting password and 2FA is enabled
@rodrigok rodrigok changed the title [FIX] Wrong message when reseting password and 2FA is enabled [FIX] Wrong message when resetting password and 2FA is enabled May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on setting a new password on recovery
3 participants