aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user/setting/security.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/setting/security.go')
-rw-r--r--routers/user/setting/security.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/setting/security.go b/routers/user/setting/security.go
index 787ac922ec..87e2ba1c02 100644
--- a/routers/user/setting/security.go
+++ b/routers/user/setting/security.go
@@ -21,6 +21,7 @@ const (
func Security(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("settings")
ctx.Data["PageIsSettingsSecurity"] = true
+ ctx.Data["RequireU2F"] = true
if ctx.Query("openid.return_to") != "" {
settingsOpenIDVerify(ctx)
@@ -68,7 +69,6 @@ func loadSecurityData(ctx *context.Context) {
ctx.ServerError("GetU2FRegistrationsByUID", err)
return
}
- ctx.Data["RequireU2F"] = true
}
tokens, err := models.ListAccessTokens(models.ListAccessTokensOptions{UserID: ctx.User.ID})