action_auth 1.5.0 → 1.6.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 +4 -4
- data/README.md +17 -0
- data/app/assets/stylesheets/action_auth/application.css +75 -0
- data/lib/action_auth/version.rb +1 -1
- data/lib/tasks/action_auth_tasks.rake +49 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0224e818bf936f4cd37a67bc6634e95d600774962f07796f88b7e66471273a8
|
4
|
+
data.tar.gz: 95281cb2e34de5fc9f91dcfb1eaca05263ebdedcc5ce4fec14223f27e2d6cf21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de4c8862b0a7ffdc2688c02d6e5b0cd2120b16d255dc2a63d5dfb2962cd99714ffd77bd80f41d2151f763fc6da44f025cb5092522d12d705db5b712fc88bb654
|
7
|
+
data.tar.gz: 7a2f3e28ae99f38d58955a3381e6aec6590c0f463b3e7d3d7294221f74bdb3580b2dbeed62d0148aca7346f3a3c7c9a59ce300d5d078b03053b7c08cb2cf3278
|
data/README.md
CHANGED
@@ -61,6 +61,23 @@ add_foreign_key :nfcs, :users, column: :user_id unless foreign_key_exists?(:nfcs
|
|
61
61
|
```
|
62
62
|
|
63
63
|
## Installation
|
64
|
+
|
65
|
+
### Automatic Installation
|
66
|
+
|
67
|
+
Add this line to your application's Gemfile:
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
bundle add action_auth
|
71
|
+
```
|
72
|
+
|
73
|
+
Then run the rake task to copy over the migrations, config and routes.
|
74
|
+
|
75
|
+
```bash
|
76
|
+
bin/rails action_auth:install
|
77
|
+
```
|
78
|
+
|
79
|
+
### Manual Installation
|
80
|
+
|
64
81
|
Add this line to your application's Gemfile:
|
65
82
|
|
66
83
|
```ruby
|
@@ -171,3 +171,78 @@ input[type="password"] {
|
|
171
171
|
.action-auth--text-center {
|
172
172
|
text-align: center !important;
|
173
173
|
}
|
174
|
+
|
175
|
+
@media (prefers-color-scheme: dark) {
|
176
|
+
body {
|
177
|
+
color: #d5c4a1;
|
178
|
+
background-color: #282828 !important;
|
179
|
+
}
|
180
|
+
|
181
|
+
.container,
|
182
|
+
.container-fluid {
|
183
|
+
background-color: #3c3836 !important;
|
184
|
+
border-color: #3c3836 !important;
|
185
|
+
}
|
186
|
+
|
187
|
+
input[type="text"],
|
188
|
+
input[type="email"],
|
189
|
+
input[type="password"] {
|
190
|
+
color: #d5c4a1;
|
191
|
+
background-color: #282828;
|
192
|
+
border-color: #3c3836;
|
193
|
+
}
|
194
|
+
|
195
|
+
.btn {
|
196
|
+
color: #fbf1c7;
|
197
|
+
background-color: #d65d0e;
|
198
|
+
border-color: #d65d0e;
|
199
|
+
}
|
200
|
+
|
201
|
+
.btn:hover {
|
202
|
+
background-color: #cc241d;
|
203
|
+
border-color: #cc241d;
|
204
|
+
}
|
205
|
+
|
206
|
+
.btn:focus {
|
207
|
+
box-shadow: 0 0 0 0.25rem rgba(214, 93, 14, .5);
|
208
|
+
}
|
209
|
+
|
210
|
+
.btn:disabled {
|
211
|
+
background-color: #d65d0e;
|
212
|
+
border-color: #d65d0e;
|
213
|
+
color: #fbf1c7;
|
214
|
+
}
|
215
|
+
|
216
|
+
.action-auth--table {
|
217
|
+
background-color: #3c3836;
|
218
|
+
color: #d5c4a1;
|
219
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
|
220
|
+
}
|
221
|
+
|
222
|
+
.action-auth--table thead {
|
223
|
+
background-color: #d79921;
|
224
|
+
color: #282828;
|
225
|
+
}
|
226
|
+
|
227
|
+
.action-auth--table th,
|
228
|
+
.action-auth--table td {
|
229
|
+
border-bottom: 1px solid #504945;
|
230
|
+
}
|
231
|
+
|
232
|
+
.action-auth--table tbody tr:hover {
|
233
|
+
background-color: #282828;
|
234
|
+
}
|
235
|
+
|
236
|
+
a {
|
237
|
+
color: #83a598;
|
238
|
+
text-decoration: none;
|
239
|
+
}
|
240
|
+
|
241
|
+
a:visited {
|
242
|
+
color: #d3869b;
|
243
|
+
}
|
244
|
+
|
245
|
+
a:hover {
|
246
|
+
color: #fabd2f;
|
247
|
+
}
|
248
|
+
}
|
data/lib/action_auth/version.rb
CHANGED
@@ -1,4 +1,49 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
1
|
+
desc "Installs Configs, Migrations, and Routes for ActionAuth"
|
2
|
+
namespace :action_auth do
|
3
|
+
task :install do
|
4
|
+
# Copies to config/initializers/action_auth.rb
|
5
|
+
puts "Installing ActionAuth Configs"
|
6
|
+
config_file_path = Rails.root.join('config', 'initializers', 'action_auth.rb')
|
7
|
+
unless File.exist?(config_file_path)
|
8
|
+
File.open(config_file_path, 'w') do |file|
|
9
|
+
file.puts <<~RUBY
|
10
|
+
# ActionAuth.configure do |config|
|
11
|
+
# config.allow_user_deletion = true
|
12
|
+
# config.default_from_email = "from@example.com"
|
13
|
+
# config.magic_link_enabled = true
|
14
|
+
# config.passkey_only = true # Allows sign in with only a passkey
|
15
|
+
# config.pwned_enabled = true # defined?(Pwned)
|
16
|
+
# config.verify_email_on_sign_in = true
|
17
|
+
# config.webauthn_enabled = true # defined?(WebAuthn)
|
18
|
+
# config.webauthn_origin = "http://localhost:3000" # or "https://example.com"
|
19
|
+
# config.webauthn_rp_name = Rails.application.class.to_s.deconstantize
|
20
|
+
# end
|
21
|
+
RUBY
|
22
|
+
end
|
23
|
+
puts "Created config/initializers/action_auth.rb"
|
24
|
+
else
|
25
|
+
puts "Config file already exists at config/initializers/action_auth.rb"
|
26
|
+
end
|
27
|
+
|
28
|
+
# Installs the ActionAuth Migrations
|
29
|
+
puts "Installing ActionAuth Migrations"
|
30
|
+
Rake::Task["action_auth:install:migrations"].invoke
|
31
|
+
|
32
|
+
# Add ActionAuth routes to config/routes.rb
|
33
|
+
puts "Installing ActionAuth Routes"
|
34
|
+
routes_file_path = Rails.root.join('config', 'routes.rb')
|
35
|
+
route_line = "mount ActionAuth::Engine => \"/action_auth\""
|
36
|
+
routes_content = File.read(routes_file_path)
|
37
|
+
unless routes_content.include?(route_line)
|
38
|
+
insert_after = "Rails.application.routes.draw do"
|
39
|
+
new_routes_content = routes_content.sub(/(#{insert_after})/i, "\\1\n #{route_line}\n")
|
40
|
+
File.open(routes_file_path, 'w') do |file|
|
41
|
+
file.puts new_routes_content
|
42
|
+
end
|
43
|
+
puts "Added ActionAuth route to config/routes.rb"
|
44
|
+
else
|
45
|
+
puts "ActionAuth route already present in config/routes.rb"
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Kimura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '7.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '7.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -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.5.
|
131
|
+
rubygems_version: 3.5.20
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: A simple Rails engine for authorization.
|