devise-multi-factor 3.2.3 → 3.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cbb1b7ddcd52c103cb7dbcc8a5829abdfc07b68543bd027a345499e3ce8cf181
4
- data.tar.gz: 9f29d1052a478e43af6dfa99b518f029204af98ffaf7dac281767883a9dae3fa
3
+ metadata.gz: '049043797485eb3339f06836e87d1057f80fbd136ac45531552c7df8e99e7bc3'
4
+ data.tar.gz: 883be054de6a9279307bbd3180ce85f30363bc962cfbfc558b75faceee5daa7f
5
5
  SHA512:
6
- metadata.gz: 5531843322ec349f8f9b667a1c106714bb75163951ba92bdc33eeba1891631f5e4a517810ffa433cd2598715f7902d4ac0e7ad1ed47a0c1d032f1c6ccf2ee9a0
7
- data.tar.gz: 7b94c72f55c0c386bb6c97967d3f985f0ce03fccda9f945b712add4bd90b89d6bfb24693e1cae703187c02004c4925d713f19065aa0e06092775975761c3fb91
6
+ metadata.gz: d471cf57ff186a79657016353e09e34f2b2d32b1729ba0074a55982d96ab24cd61d4a4335b0fc8584b7e6cf843ec746b6d46e52577c6c82c2599a2f8c5788cd5
7
+ data.tar.gz: fac22c866c3038b16e97ace82f9d4e59b76111943f51e051e74a45b769e17e4648c9efd90469c5574171cef3de5798436835095239ee7eecaca265b879bc3091
@@ -74,6 +74,7 @@ class Devise::TotpController < DeviseController
74
74
  end
75
75
 
76
76
  def authenticate_scope!
77
+ send(:"authenticate_#{resource_name}!", force: true)
77
78
  self.resource = send("current_#{resource_name}")
78
79
  end
79
80
  end
@@ -76,6 +76,7 @@ class Devise::TwoFactorAuthenticationController < DeviseController
76
76
  end
77
77
 
78
78
  def authenticate_scope!
79
+ send(:"authenticate_#{resource_name}!", force: true)
79
80
  self.resource = send("current_#{resource_name}")
80
81
  end
81
82
 
@@ -24,14 +24,12 @@ module DeviseMultiFactor
24
24
  end
25
25
 
26
26
  def handle_failed_second_factor(scope)
27
- if request.format.present?
28
- if request.format.html?
29
- session["#{scope}_return_to"] = request.original_fullpath if request.get?
30
- redirect_to two_factor_authentication_path_for(scope)
31
- elsif request.format.json?
32
- session["#{scope}_return_to"] = root_path(format: :html)
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
@@ -1,3 +1,3 @@
1
1
  module DeviseMultiFactor
2
- VERSION = "3.2.3".freeze
2
+ VERSION = "3.2.5".freeze
3
3
  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.3
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: 2023-01-09 00:00:00.000000000 Z
12
+ date: 2024-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails