passwordless 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/models/passwordless/session.rb +2 -2
- data/lib/passwordless/controller_helpers.rb +2 -2
- data/lib/passwordless/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b19e22b9a7152b299c8f639339709ebeaa3616ecfd7a85f461af205d8f6ad635
|
4
|
+
data.tar.gz: 8858c326d1457db832e08909957948d49d525bde1d45effa52e4d8e9b22f0374
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 146b741cd502a702a10ed5169575eb5d6e9c47b0be8469e74b4e2369d2ecb82c1845624afe04aac2cac4e701deb6ea726e916dc1019007bdacd48e510272c9b7
|
7
|
+
data.tar.gz: f95c455c20f127c1a86c0df6763afdf2f90312afd429b81f96b8dd1e0901ac17c7cb3e8c1ff38d858d5208149eedf8257eff0b1e40809aa58c2189df58d1f90b
|
data/README.md
CHANGED
@@ -228,7 +228,7 @@ config/initializers/passwordless.rb
|
|
228
228
|
```
|
229
229
|
Passwordless.after_session_save = lambda do |session, request|
|
230
230
|
# Default behavior is
|
231
|
-
# Mailer.magic_link(session).deliver_now
|
231
|
+
# Passwordless::Mailer.magic_link(session).deliver_now
|
232
232
|
|
233
233
|
# You can change behavior to do something with session model. For example,
|
234
234
|
# session.authenticatable.send_sms
|
@@ -19,7 +19,7 @@ module Passwordless
|
|
19
19
|
before_validation :set_defaults
|
20
20
|
|
21
21
|
scope :available, lambda {
|
22
|
-
where("
|
22
|
+
where("expires_at > ?", Time.current)
|
23
23
|
}
|
24
24
|
|
25
25
|
def self.valid
|
@@ -47,7 +47,7 @@ module Passwordless
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def available?
|
50
|
-
!
|
50
|
+
!expired?
|
51
51
|
end
|
52
52
|
|
53
53
|
private
|
@@ -44,11 +44,11 @@ module Passwordless
|
|
44
44
|
def upgrade_passwordless_cookie(authenticatable_class)
|
45
45
|
key = cookie_name(authenticatable_class)
|
46
46
|
|
47
|
-
return unless authenticatable_id = cookies.encrypted[key]
|
47
|
+
return unless (authenticatable_id = cookies.encrypted[key])
|
48
48
|
cookies.encrypted.permanent[key] = {value: nil}
|
49
49
|
cookies.delete(key)
|
50
50
|
|
51
|
-
return unless record = authenticatable_class.find_by(id: authenticatable_id)
|
51
|
+
return unless (record = authenticatable_class.find_by(id: authenticatable_id))
|
52
52
|
new_session = build_passwordless_session(record).tap { |s| s.save! }
|
53
53
|
|
54
54
|
sign_in new_session
|
data/lib/passwordless/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passwordless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikkel Malmberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
rubygems_version: 3.0.
|
131
|
+
rubygems_version: 3.0.3
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Add authentication to your app without all the ickyness of passwords.
|