summaryrefslogtreecommitdiff
path: root/internal/handlers/handler_user_info.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2022-04-18 09:58:24 +1000
committerGitHub <noreply@github.com>2022-04-18 09:58:24 +1000
commite99fb7a08fa61676c6ea8ce7be24d9d3cf0f5665 (patch)
tree40e4c894c3d9876c71e394d71406e0d4cd39150e /internal/handlers/handler_user_info.go
parent9bd10e6409030ffb17020ff7fb027eed34b28b0a (diff)
feat(configuration): configurable default second factor method (#3081)
This allows configuring the default second factor method.
Diffstat (limited to 'internal/handlers/handler_user_info.go')
-rw-r--r--internal/handlers/handler_user_info.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/handlers/handler_user_info.go b/internal/handlers/handler_user_info.go
index 4b95b3e6f..28489b6e7 100644
--- a/internal/handlers/handler_user_info.go
+++ b/internal/handlers/handler_user_info.go
@@ -39,7 +39,7 @@ func UserInfoPOST(ctx *middlewares.AutheliaCtx) {
changed bool
)
- if changed = userInfo.SetDefaultPreferred2FAMethod(ctx.AvailableSecondFactorMethods()); changed {
+ if changed = userInfo.SetDefaultPreferred2FAMethod(ctx.AvailableSecondFactorMethods(), ctx.Configuration.Default2FAMethod); changed {
if err = ctx.Providers.StorageProvider.SavePreferred2FAMethod(ctx, userSession.Username, userInfo.Method); err != nil {
ctx.Error(fmt.Errorf("unable to save user two factor method: %v", err), messageOperationFailed)
return