Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
086925ea
Unverified
Commit
086925ea
authored
2 years ago
by
Sébastien Gaya
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into rework-dependencies
parents
488086f7
8c16cbd7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Gemfile.lock
+63
-63
63 additions, 63 deletions
Gemfile.lock
app/models/user/with_authentication.rb
+8
-3
8 additions, 3 deletions
app/models/user/with_authentication.rb
with
71 additions
and
66 deletions
Gemfile.lock
+
63
−
63
View file @
086925ea
...
...
@@ -9,9 +9,9 @@ GIT
GIT
remote: https://github.com/noesya/two_factor_authentication.git
revision:
cdabe19b43c10e1265cc6e92ac545c20841638cf
revision:
55807c784803abb1f93000adab3e3b3f518b508b
specs:
two_factor_authentication (3.0.
1
)
two_factor_authentication (3.0.
2
)
devise
encryptor
rails (>= 3.1.1)
...
...
@@ -21,60 +21,60 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.
6.1
)
actionpack (= 6.1.
6.1
)
activesupport (= 6.1.
6.1
)
actioncable (6.1.
7
)
actionpack (= 6.1.
7
)
activesupport (= 6.1.
7
)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.
6.1
)
actionpack (= 6.1.
6.1
)
activejob (= 6.1.
6.1
)
activerecord (= 6.1.
6.1
)
activestorage (= 6.1.
6.1
)
activesupport (= 6.1.
6.1
)
actionmailbox (6.1.
7
)
actionpack (= 6.1.
7
)
activejob (= 6.1.
7
)
activerecord (= 6.1.
7
)
activestorage (= 6.1.
7
)
activesupport (= 6.1.
7
)
mail (>= 2.7.1)
actionmailer (6.1.
6.1
)
actionpack (= 6.1.
6.1
)
actionview (= 6.1.
6.1
)
activejob (= 6.1.
6.1
)
activesupport (= 6.1.
6.1
)
actionmailer (6.1.
7
)
actionpack (= 6.1.
7
)
actionview (= 6.1.
7
)
activejob (= 6.1.
7
)
activesupport (= 6.1.
7
)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.
6.1
)
actionview (= 6.1.
6.1
)
activesupport (= 6.1.
6.1
)
actionpack (6.1.
7
)
actionview (= 6.1.
7
)
activesupport (= 6.1.
7
)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.
6.1
)
actionpack (= 6.1.
6.1
)
activerecord (= 6.1.
6.1
)
activestorage (= 6.1.
6.1
)
activesupport (= 6.1.
6.1
)
actiontext (6.1.
7
)
actionpack (= 6.1.
7
)
activerecord (= 6.1.
7
)
activestorage (= 6.1.
7
)
activesupport (= 6.1.
7
)
nokogiri (>= 1.8.5)
actionview (6.1.
6.1
)
activesupport (= 6.1.
6.1
)
actionview (6.1.
7
)
activesupport (= 6.1.
7
)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.
6.1
)
activesupport (= 6.1.
6.1
)
activejob (6.1.
7
)
activesupport (= 6.1.
7
)
globalid (>= 0.3.6)
activemodel (6.1.
6.1
)
activesupport (= 6.1.
6.1
)
activerecord (6.1.
6.1
)
activemodel (= 6.1.
6.1
)
activesupport (= 6.1.
6.1
)
activestorage (6.1.
6.1
)
actionpack (= 6.1.
6.1
)
activejob (= 6.1.
6.1
)
activerecord (= 6.1.
6.1
)
activesupport (= 6.1.
6.1
)
activemodel (6.1.
7
)
activesupport (= 6.1.
7
)
activerecord (6.1.
7
)
activemodel (= 6.1.
7
)
activesupport (= 6.1.
7
)
activestorage (6.1.
7
)
actionpack (= 6.1.
7
)
activejob (= 6.1.
7
)
activerecord (= 6.1.
7
)
activesupport (= 6.1.
7
)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.
6.1
)
activesupport (6.1.
7
)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
...
...
@@ -89,8 +89,8 @@ GEM
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
aws-eventstream (1.2.0)
aws-partitions (1.6
24
.0)
aws-sdk-core (3.1
3
8.0)
aws-partitions (1.6
31
.0)
aws-sdk-core (3.1
4
8.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
...
...
@@ -256,7 +256,7 @@ GEM
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.1
8
.0)
loofah (2.1
9
.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
...
...
@@ -295,13 +295,13 @@ GEM
racc (~> 1.4)
nokogiri (1.13.8-x86_64-linux)
racc (~> 1.4)
oauth2 (1.4.1
0
)
oauth2 (1.4.1
1
)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, <
3
)
octokit (5.
4.0
)
rack (>= 1.2, <
4
)
octokit (5.
6.1
)
faraday (>= 1, < 3)
sawyer (~> 0.9)
omniauth (2.1.0)
...
...
@@ -328,20 +328,20 @@ GEM
rack
rack-test (2.0.2)
rack (>= 1.3)
rails (6.1.
6.1
)
actioncable (= 6.1.
6.1
)
actionmailbox (= 6.1.
6.1
)
actionmailer (= 6.1.
6.1
)
actionpack (= 6.1.
6.1
)
actiontext (= 6.1.
6.1
)
actionview (= 6.1.
6.1
)
activejob (= 6.1.
6.1
)
activemodel (= 6.1.
6.1
)
activerecord (= 6.1.
6.1
)
activestorage (= 6.1.
6.1
)
activesupport (= 6.1.
6.1
)
rails (6.1.
7
)
actioncable (= 6.1.
7
)
actionmailbox (= 6.1.
7
)
actionmailer (= 6.1.
7
)
actionpack (= 6.1.
7
)
actiontext (= 6.1.
7
)
actionview (= 6.1.
7
)
activejob (= 6.1.
7
)
activemodel (= 6.1.
7
)
activerecord (= 6.1.
7
)
activestorage (= 6.1.
7
)
activesupport (= 6.1.
7
)
bundler (>= 1.15.0)
railties (= 6.1.
6.1
)
railties (= 6.1.
7
)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
...
...
@@ -351,9 +351,9 @@ GEM
rails-i18n (7.0.5)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (6.1.
6.1
)
actionpack (= 6.1.
6.1
)
activesupport (= 6.1.
6.1
)
railties (6.1.
7
)
actionpack (= 6.1.
7
)
activesupport (= 6.1.
7
)
method_source
rake (>= 12.2)
thor (~> 1.0)
...
...
@@ -437,7 +437,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.
2
.0)
unicode-display_width (2.
3
.0)
unsplash (2.1.0)
httparty (~> 0.16)
oauth2 (~> 1)
...
...
@@ -536,4 +536,4 @@ RUBY VERSION
ruby 2.7.6p219
BUNDLED WITH
2.3.1
2
2.3.1
1
This diff is collapsed.
Click to expand it.
app/models/user/with_authentication.rb
+
8
−
3
View file @
086925ea
...
...
@@ -38,11 +38,16 @@ module User::WithAuthentication
true
end
def
direct_otp_default_delivery_method
mobile_phone
.
present?
?
:mobile_phone
:
:email
end
def
send_two_factor_authentication_code
(
code
,
delivery_method
)
if
mobile_phone
.
blank?
||
delivery_method
==
:email
send_devise_notification
(
:two_factor_authentication_code
,
code
,
{})
else
case
delivery_method
when
:mobile_phone
Sendinblue
::
SmsService
.
send_mfa_code
(
self
,
code
)
when
:email
send_devise_notification
(
:two_factor_authentication_code
,
code
,
{})
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment