devise-multi-factor 3.2.4 → 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: 96a02382ae3f76aececf2dd627d3b2d569717415f117fc77d04d2e226144b838
4
- data.tar.gz: 6fefdf2bed71cfd902cf616c26fda765b452d04e64abeeb12e5221c42b5895d8
3
+ metadata.gz: '049043797485eb3339f06836e87d1057f80fbd136ac45531552c7df8e99e7bc3'
4
+ data.tar.gz: 883be054de6a9279307bbd3180ce85f30363bc962cfbfc558b75faceee5daa7f
5
5
  SHA512:
6
- metadata.gz: 8048102b6c4b1f926ce0cfdfd59b0a4f2b79f3bed0952d44257ddb5c3fadbcad3b1d9f72b206d7de7dff86150339974e96344048fa6e03b47c54caa5033042e4
7
- data.tar.gz: c1913898b7e3fb27897955f1526051f33d76c1c80a61212e2246aeb35699a834135c0c4a2ef5a952770bdcb07767c7836e5748ba52e6f14ef82f8800a666c64e
6
+ metadata.gz: d471cf57ff186a79657016353e09e34f2b2d32b1729ba0074a55982d96ab24cd61d4a4335b0fc8584b7e6cf843ec746b6d46e52577c6c82c2599a2f8c5788cd5
7
+ data.tar.gz: fac22c866c3038b16e97ace82f9d4e59b76111943f51e051e74a45b769e17e4648c9efd90469c5574171cef3de5798436835095239ee7eecaca265b879bc3091
@@ -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.4".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.4
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-03-20 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