|
|
@@ -452,13 +452,6 @@ func initiateTOTPSetup(w http.ResponseWriter, r *http.Request) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if user.IsMFAEnabled {
|
|
|
- err = fmt.Errorf("mfa is already enabled for user, cannot process totp setup")
|
|
|
- logger.Log(0, err.Error())
|
|
|
- logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest"))
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
if user.AuthType == models.OAuth {
|
|
|
err = fmt.Errorf("auth type is %s, cannot process totp setup", user.AuthType)
|
|
|
logger.Log(0, err.Error())
|
|
|
@@ -538,13 +531,6 @@ func completeTOTPSetup(w http.ResponseWriter, r *http.Request) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if user.IsMFAEnabled {
|
|
|
- err = fmt.Errorf("mfa is already enabled for user, cannot process totp setup")
|
|
|
- logger.Log(0, err.Error())
|
|
|
- logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest"))
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
if user.AuthType == models.OAuth {
|
|
|
err = fmt.Errorf("auth type is %s, cannot process totp setup", user.AuthType)
|
|
|
logger.Log(0, err.Error())
|