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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,16 @@ Template.resetPassword.events({
RocketChat.Button.reset(button);
if (error) {
console.log(error);
swal({
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

toastr.success(t('Password_changed_successfully'));
RocketChat.callbacks.run('userPasswordReset');
FlowRouter.go('login');
} else {
swal({
title: t('Error_changing_password'),
type: 'error'
});
}
} else {
FlowRouter.go('home');
toastr.success(t('Password_changed_successfully'));
Expand Down