diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-04-18 09:58:24 +1000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-18 09:58:24 +1000 | 
| commit | e99fb7a08fa61676c6ea8ce7be24d9d3cf0f5665 (patch) | |
| tree | 40e4c894c3d9876c71e394d71406e0d4cd39150e /internal/handlers/handler_user_info.go | |
| parent | 9bd10e6409030ffb17020ff7fb027eed34b28b0a (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.go | 2 | 
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  | 
