diff --git a/routers/user/setting/security_twofa.go b/routers/user/setting/security_twofa.go index 4ee698e15e66f..925fc2a443001 100644 --- a/routers/user/setting/security_twofa.go +++ b/routers/user/setting/security_twofa.go @@ -195,7 +195,7 @@ func EnrollTwoFactorPost(ctx *context.Context, form auth.TwoFactorAuthForm) { return } ctx.Flash.Error(ctx.Tr("settings.passcode_invalid")) - ctx.HTML(200, tplSettingsTwofaEnroll) + ctx.Redirect(setting.AppSubURL + "/user/settings/security/two_factor/enroll") return }