devise_xfactor_authentication 2.2.20 → 2.2.21

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: c2e0e41652b583da294f118a3a832491cabaedb746a2c4c829b7c08f144c996c
4
- data.tar.gz: d49e9d7a75151ddcd14de47c686f04c1766002af5c6c8736b467564cda8ac10e
3
+ metadata.gz: b9ec733cecf344031a24ef18170d6eded851ab4c946a653ced97e200d98f6861
4
+ data.tar.gz: 4d871f28b132c3644f033fe2155c6f6298063bb4359c586c2ee17d81a6acd492
5
5
  SHA512:
6
- metadata.gz: 92ea75d1ec6728611935c4e648c1991605904da1e1a88903f026b8569d6d053678bd6e3a37a8e9a475b06aefa001325d86ac6a6d094cf25cc8481932a0e987b1
7
- data.tar.gz: 251983220403608b5623fcff740dbd0704cb5ccc38cf63f7fc2e86681dd1ad65fbb6200bbcacf8ba445470558672894423ed15290552f58cb8c1a2a78ba2bc2f
6
+ metadata.gz: 1c43018d42a2aa629af899b6968d1cc48a0feb6074d826b1c106e7feadcb736692158223197026499c80c376f3ef56a4deb36c9bcb968321f18aab2d9d377d7a
7
+ data.tar.gz: e5c9afd0249e904708a5dbf3c2f4f0409140c9ec96cdfa497b37b01fd599504c4e2ef3c1d51070178526f04288133d8a17b17cdc1721c505a4416adf36abc51f
@@ -38,9 +38,12 @@ class Devise::DeviseXfactorAuthenticationController < DeviseController
38
38
  else
39
39
  sign_in(resource_name, resource, bypass: true)
40
40
  end
41
- set_flash_message!(:notice, :success)
42
- resource.update(second_factor_attempts_count: 0)
43
-
41
+ if resource.uses_two_factor?
42
+ set_flash_message!(:notice, :success)
43
+ resource.update(second_factor_attempts_count: 0)
44
+ else
45
+ set_flash_message!(:notice, "Signed in successfully")
46
+ end
44
47
  redirect_to after_devise_xfactor_success_path_for(resource)
45
48
  end
46
49
 
@@ -1,3 +1,3 @@
1
1
  module DeviseXfactorAuthentication
2
- VERSION = "2.2.20".freeze
2
+ VERSION = "2.2.21".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_xfactor_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.20
4
+ version: 2.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathon Pickett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-16 00:00:00.000000000 Z
11
+ date: 2022-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails