rails_jwt_auth 0.17.0 → 0.17.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c2aed170511243b66a49dc2913ba59c5e00e5b5
|
4
|
+
data.tar.gz: a7cb07b8a569c4af7f6b65211be0109ba0d88ee0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14f8f7d270903f22e5adffab7f158e4d4a0c24ccae6bb6abd2d9cd9908901980b7699800ab00ee5ddbdef82446e51c6f2944f7176ffcc8dcb386945eb989ed4b
|
7
|
+
data.tar.gz: 7f326f34d1c084dbed94362941f7d4f9d493f23fdba54f1ccaa43ac60a8ac71f0c25088764caeb26c3ec4f254b290ae3b55b725643cd60210077bed23976b6be
|
@@ -59,7 +59,12 @@ module RailsJwtAuth
|
|
59
59
|
if email_changed? && email_was && !confirmed_at_changed?
|
60
60
|
self.unconfirmed_email = email
|
61
61
|
self.email = email_was
|
62
|
-
|
62
|
+
|
63
|
+
self.confirmation_token = SecureRandom.base58(24)
|
64
|
+
self.confirmation_sent_at = Time.now
|
65
|
+
|
66
|
+
mailer = Mailer.confirmation_instructions(self)
|
67
|
+
RailsJwtAuth.deliver_later ? mailer.deliver_later : mailer.deliver
|
63
68
|
end
|
64
69
|
end
|
65
70
|
end
|
@@ -67,9 +72,9 @@ module RailsJwtAuth
|
|
67
72
|
private
|
68
73
|
|
69
74
|
def validate_confirmation
|
70
|
-
return true
|
75
|
+
return true unless confirmed_at
|
71
76
|
|
72
|
-
if confirmed_at_was
|
77
|
+
if confirmed_at_was && !email_changed?
|
73
78
|
errors.add(:email, I18n.t('rails_jwt_auth.errors.already_confirmed'))
|
74
79
|
elsif confirmation_sent_at &&
|
75
80
|
(confirmation_sent_at < (Time.now - RailsJwtAuth.confirmation_expiration_time))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_jwt_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rjurado
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -126,9 +126,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.
|
129
|
+
rubygems_version: 2.5.2
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Rails jwt authentication.
|
133
133
|
test_files: []
|
134
|
-
has_rdoc:
|