devise-multi-factor 3.2.3 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '049043797485eb3339f06836e87d1057f80fbd136ac45531552c7df8e99e7bc3'
|
4
|
+
data.tar.gz: 883be054de6a9279307bbd3180ce85f30363bc962cfbfc558b75faceee5daa7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d471cf57ff186a79657016353e09e34f2b2d32b1729ba0074a55982d96ab24cd61d4a4335b0fc8584b7e6cf843ec746b6d46e52577c6c82c2599a2f8c5788cd5
|
7
|
+
data.tar.gz: fac22c866c3038b16e97ace82f9d4e59b76111943f51e051e74a45b769e17e4648c9efd90469c5574171cef3de5798436835095239ee7eecaca265b879bc3091
|
@@ -24,14 +24,12 @@ module DeviseMultiFactor
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def handle_failed_second_factor(scope)
|
27
|
-
if request.format.
|
28
|
-
if request.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
render json: { redirect_to: two_factor_authentication_path_for(scope) }, status: :unauthorized
|
34
|
-
end
|
27
|
+
if request.format.html?
|
28
|
+
session["#{scope}_return_to"] = request.original_fullpath if request.get?
|
29
|
+
redirect_to two_factor_authentication_path_for(scope)
|
30
|
+
elsif request.format.json?
|
31
|
+
session["#{scope}_return_to"] = root_path(format: :html)
|
32
|
+
render json: { redirect_to: two_factor_authentication_path_for(scope) }, status: :unauthorized
|
35
33
|
else
|
36
34
|
head :unauthorized
|
37
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-multi-factor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitrii Golub
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-01-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|