Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9d734be1
Commit
9d734be1
authored
Sep 10, 2021
by
Luke Duncalfe
Committed by
Mark Chao
Sep 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Require confirmed email to enable 2FA
parent
f21cb86d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
app/controllers/profiles/two_factor_auths_controller.rb
app/controllers/profiles/two_factor_auths_controller.rb
+1
-1
config/feature_flags/development/ensure_verified_primary_email_for_2fa.yml
...ags/development/ensure_verified_primary_email_for_2fa.yml
+1
-1
doc/user/profile/account/two_factor_authentication.md
doc/user/profile/account/two_factor_authentication.md
+13
-2
No files found.
app/controllers/profiles/two_factor_auths_controller.rb
View file @
9d734be1
...
...
@@ -221,7 +221,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
end
def
ensure_verified_primary_email
return
unless
Feature
.
enabled?
(
:ensure_verified_primary_email_for_2fa
)
return
unless
Feature
.
enabled?
(
:ensure_verified_primary_email_for_2fa
,
default_enabled: :yaml
)
unless
current_user
.
two_factor_enabled?
||
current_user
.
primary_email_verified?
redirect_to
profile_emails_path
,
notice:
s_
(
'You need to verify your primary email first before enabling Two-Factor Authentication.'
)
...
...
config/feature_flags/development/ensure_verified_primary_email_for_2fa.yml
View file @
9d734be1
...
...
@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/340151
milestone
:
'
14.3'
type
:
development
group
:
group::access
default_enabled
:
fals
e
default_enabled
:
tru
e
doc/user/profile/account/two_factor_authentication.md
View file @
9d734be1
...
...
@@ -35,8 +35,19 @@ still access your account if you lose your U2F / WebAuthn device.
## Enabling 2FA
There are multiple ways to enable two-factor authentication: by using a one-time
password authenticator or a U2F / WebAuthn device.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/35102) in GitLab 14.3, account email confirmation required.
There are multiple ways to enable two-factor authentication (2FA):
-
Using a one-time password authenticator.
-
Using a U2F / WebAuthn device.
In GitLab 14.3 and later, your account email must be confirmed to enable two-factor authentication.
FLAG:
On self-managed GitLab, account email confirmation requirement is enabled. To disable this
restriction, ask an administrator to
[
disable the `ensure_verified_primary_email_for_2fa` flag
](
../../../administration/feature_flags.md
)
.
### One-time password
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment