minimalist_authentication 2.1.1 → 2.2.0
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 +5 -5
- data/README.md +2 -2
- data/app/controllers/emails_controller.rb +1 -1
- data/app/controllers/passwords_controller.rb +1 -1
- data/lib/minimalist_authentication/sessions.rb +8 -3
- data/lib/minimalist_authentication/verifiable_token.rb +1 -1
- data/lib/minimalist_authentication/version.rb +1 -1
- metadata +26 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7a2486a7a8ebc10d0d26d0d91086b3897ab00cd9b5ab7a8536d4446158fb814f
|
4
|
+
data.tar.gz: d947bf6cd11550149928753b2deb7bef9d6d6b86ce77519ed4aa26e7fd0dcca7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b563bfa903c84aeecf8ca548b3c0f82782916b2d73f3ab323ebec38436dc233b2e5f3417fb4f017b3eecfe776478ff976b79ed7bee1e379766acac6f02f5e85a
|
7
|
+
data.tar.gz: 89f97497d4d358311f4a80cc83fa5a6cc31ddcaebf4719576f5ce563eb0b28d9c0a590ede7094b1fe79df7945a51735bedd7d15ee5369c2fb8c0052bc46ac341
|
data/README.md
CHANGED
@@ -119,7 +119,7 @@ end
|
|
119
119
|
|
120
120
|
Add the **email_verified_at** column to your user model:
|
121
121
|
```bash
|
122
|
-
bin/rails generate migration
|
122
|
+
bin/rails generate migration AddEmailVerifiedAtToUsers email_verified_at:datetime
|
123
123
|
```
|
124
124
|
|
125
125
|
|
@@ -147,4 +147,4 @@ When the conversion is complete the **crypted_password**, **salt**, and
|
|
147
147
|
|
148
148
|
|
149
149
|
## License
|
150
|
-
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT)
|
150
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT)..
|
@@ -3,8 +3,8 @@ module MinimalistAuthentication
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
-
skip_before_action
|
7
|
-
|
6
|
+
skip_before_action :authorization_required, only: %i(new create)
|
7
|
+
before_action :redirect_logged_in_users, only: :new
|
8
8
|
end
|
9
9
|
|
10
10
|
def new
|
@@ -53,6 +53,11 @@ module MinimalistAuthentication
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
def redirect_logged_in_users
|
57
|
+
redirect_to(login_redirect_to) if logged_in?
|
58
|
+
end
|
59
|
+
|
60
|
+
|
56
61
|
def after_authentication_success
|
57
62
|
redirect_back_or_default(login_redirect_to)
|
58
63
|
end
|
@@ -69,7 +74,7 @@ module MinimalistAuthentication
|
|
69
74
|
end
|
70
75
|
|
71
76
|
def scrub_session!
|
72
|
-
(session.keys - %w(session_id
|
77
|
+
(session.keys - %w(session_id return_to)).each do |key|
|
73
78
|
session.delete(key)
|
74
79
|
end
|
75
80
|
end
|
metadata
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minimalist_authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Baldwin
|
8
8
|
- Brightways Learning
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-08-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '5.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '5.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
@@ -46,19 +46,33 @@ dependencies:
|
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 3.1.3
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
49
|
+
name: loofah
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
-
type: :
|
54
|
+
version: 2.3.1
|
55
|
+
type: :runtime
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 2.3.1
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: sqlite3
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.3'
|
69
|
+
type: :development
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.3'
|
62
76
|
description: A Rails authentication plugin that takes a minimalist approach. It is
|
63
77
|
designed to be simple to understand, use, and modify for your application.
|
64
78
|
email:
|
@@ -110,7 +124,7 @@ homepage: https://github.com/wwidea/minimalist_authentication
|
|
110
124
|
licenses:
|
111
125
|
- MIT
|
112
126
|
metadata: {}
|
113
|
-
post_install_message:
|
127
|
+
post_install_message:
|
114
128
|
rdoc_options: []
|
115
129
|
require_paths:
|
116
130
|
- lib
|
@@ -125,9 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
139
|
- !ruby/object:Gem::Version
|
126
140
|
version: '0'
|
127
141
|
requirements: []
|
128
|
-
|
129
|
-
|
130
|
-
signing_key:
|
142
|
+
rubygems_version: 3.1.2
|
143
|
+
signing_key:
|
131
144
|
specification_version: 4
|
132
145
|
summary: A Rails authentication plugin that takes a minimalist approach.
|
133
146
|
test_files: []
|