devise-otp 0.5.0 → 0.6.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40ba57c939a2a84a81a014b151a2ea0fe37a4253942df15a703a0fd83aa9e80c
|
4
|
+
data.tar.gz: bba9a1e8d78ea6760c9c32ed643c05ed9138635095c0f9a16451f6a9922bfeba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79f30180843989aed3f784e8d775d8d86a206a328f3032b7f202815e1f590fcc5d3bf3d65cccc20731af5d1de227dd2d857111432fc21ad305524a402219f91a
|
7
|
+
data.tar.gz: 905e257c92ef4cad86876a2e37ec46cea614dafc715ebff364e58c580f7ab1528181771ff96534e5e61978168840f4a9820729b9d819f4c7c002ec970de81da5
|
data/README.md
CHANGED
@@ -15,6 +15,10 @@ Some of the compatible token devices are:
|
|
15
15
|
|
16
16
|
Device OTP was recently updated to work with Rails 7 and Turbo.
|
17
17
|
|
18
|
+
## Sponsor
|
19
|
+
|
20
|
+
Devise::OTP development is sponsored by [Business Class](https://businessclasskit.com/) Rails SaaS starter kit. If you don't want to setup OTP yourself for your new project, consider starting one on Business Class.
|
21
|
+
|
18
22
|
## Two-factors authentication using OTP
|
19
23
|
|
20
24
|
* A shared secret is generated on the server, and stored both on the token device (e.g. the phone) and the server itself.
|
data/devise-otp.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.files = `git ls-files`.split($/)
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
|
17
|
-
gem.add_runtime_dependency "rails", ">=
|
17
|
+
gem.add_runtime_dependency "rails", ">= 6.1", "< 7.2"
|
18
18
|
gem.add_runtime_dependency "devise", ">= 4.8.0", "< 5.0"
|
19
19
|
gem.add_runtime_dependency "rotp", ">= 2.0.0"
|
20
20
|
|
data/lib/devise-otp/version.rb
CHANGED
@@ -18,6 +18,7 @@ module DeviseOtpAuthenticatable::Hooks
|
|
18
18
|
|
19
19
|
otp_refresh_credentials_for(resource)
|
20
20
|
|
21
|
+
yield resource if block_given?
|
21
22
|
if otp_challenge_required_on?(resource)
|
22
23
|
challenge = resource.generate_otp_challenge!
|
23
24
|
warden.logout
|
@@ -48,7 +49,7 @@ module DeviseOtpAuthenticatable::Hooks
|
|
48
49
|
# the resource -should- have otp turned on, but it isn't
|
49
50
|
#
|
50
51
|
def otp_mandatory_on?(resource)
|
51
|
-
return true if resource.class.otp_mandatory
|
52
|
+
return true if resource.class.otp_mandatory && !resource.otp_enabled
|
52
53
|
return false unless resource.respond_to?(:otp_mandatory)
|
53
54
|
|
54
55
|
resource.otp_mandatory && !resource.otp_enabled
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-otp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lele Forzani
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -17,7 +17,7 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '6.1'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: '7.2'
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: '
|
30
|
+
version: '6.1'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '7.2'
|