emailauth 0.0.2 → 0.0.3
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.
- data/lib/emailauth/authenticator.rb +3 -2
- metadata +2 -2
|
@@ -29,10 +29,11 @@ class EmailAuth::Authenticator
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
##
|
|
32
|
-
# Validates whether a TOTP code is valid for a particular secret
|
|
32
|
+
# Validates whether a TOTP code is valid for a particular secret.
|
|
33
|
+
# Allows for a 30 second max transmission delay
|
|
33
34
|
##
|
|
34
35
|
def self.validateTOTP(auth_secret, code)
|
|
35
|
-
return
|
|
36
|
+
return ROTP::TOTP.new(auth_secret).verify_with_drift(code, 30)
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
##
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: emailauth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
54
54
|
requirements:
|
|
55
55
|
- - ! '>='
|
|
56
56
|
- !ruby/object:Gem::Version
|
|
57
|
-
version: 0
|
|
57
|
+
version: '0'
|
|
58
58
|
requirements: []
|
|
59
59
|
rubyforge_project:
|
|
60
60
|
rubygems_version: 1.8.23
|