Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hf committed Mar 13, 2024
1 parent cb45ac0 commit 802606a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/api/mfa.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func (a *API) EnrollFactor(w http.ResponseWriter, r *http.Request) error {
return err
}

issuer := ""
if params.FactorType != models.TOTP {
return badRequestError(ErrorCodeValidationFailed, "factor_type needs to be totp")
}
Expand Down Expand Up @@ -104,7 +103,7 @@ func (a *API) EnrollFactor(w http.ResponseWriter, r *http.Request) error {
}

if factorCount >= int(config.MFA.MaxEnrolledFactors) {
return forbiddenError("Enrolled factors exceed allowed limit, unenroll to continue")
return forbiddenError(ErrorCodeTooManyEnrolledMFAFactors, "Maximum number of verified factors reached, unenroll to continue")
}

if numVerifiedFactors >= config.MFA.MaxVerifiedFactors {
Expand Down

0 comments on commit 802606a

Please sign in to comment.