In some cases, the server returns `user_second_factors` as the error key in the response

This commit is contained in:
Penar Musaraj 2024-06-05 14:17:58 -04:00
parent b9023e0eb4
commit bbab50fa62
No known key found for this signature in database
GPG Key ID: E390435D881FF0F7
1 changed files with 4 additions and 1 deletions

View File

@ -93,7 +93,10 @@ export default Controller.extend(PasswordValidation, {
DiscourseURL.redirectTo(result.redirect_to || "/");
}
} else {
if (result.errors.security_keys) {
if (
result.errors.security_keys ||
result.errors.user_second_factors
) {
this.setProperties({
secondFactorRequired: this.secondFactorRequired,
securityKeyRequired: this.securityKeyRequired,