authentication-zero 2.16.25 → 2.16.26
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/Gemfile.lock +1 -1
- data/lib/authentication_zero/version.rb +1 -1
- data/lib/generators/authentication/authentication_generator.rb +12 -16
- data/lib/generators/authentication/templates/erb/home/index.html.erb.tt +2 -6
- data/lib/generators/authentication/templates/erb/invitations/new.html.erb.tt +6 -0
- data/lib/generators/authentication/templates/erb/two_factor_authentication/challenge/totps/new.html.erb.tt +1 -3
- data/lib/generators/authentication/templates/erb/two_factor_authentication/profile/recovery_codes/index.html.erb.tt +1 -1
- data/lib/generators/authentication/templates/erb/two_factor_authentication/profile/security_keys/index.html.erb.tt +9 -1
- data/lib/generators/authentication/templates/erb/two_factor_authentication/profile/totps/new.html.erb.tt +6 -0
- data/lib/generators/authentication/templates/erb/user_mailer/email_verification.html.erb.tt +1 -1
- data/lib/generators/authentication/templates/erb/user_mailer/passwordless.html.erb.tt +1 -1
- data/lib/generators/authentication/templates/javascript/controllers/{application.js.tt → application.js} +0 -4
- 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: 31829b8815a7d6b7720997ea3cc1e85d602b43c3a2a4da30c346638617adfdb2
|
4
|
+
data.tar.gz: 1869578bdefc46e75910a53c3d6a65326255ec63ed0f7b5ceb11612e8b748b35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9134009142fed3d0f971887a21755c85369dd81f3896bb9aa6141b14a600c095ad7a16a45fd2efa69c83a10d3239450bde10300b21ac38fbfa396ae73e0cd5aa
|
7
|
+
data.tar.gz: c6647adbf7164587702ca53b4bda230c835ed53112172551c7f3f5555224f722c5f69e8511d37a5b59983a78a4d5bc778d6fbe2a556f73460b0f900893081441
|
data/Gemfile.lock
CHANGED
@@ -115,15 +115,11 @@ class AuthenticationGenerator < Rails::Generators::Base
|
|
115
115
|
template "controllers/#{format_folder}/authentications/events_controller.rb", "app/controllers/authentications/events_controller.rb" if options.trackable?
|
116
116
|
end
|
117
117
|
|
118
|
-
def
|
119
|
-
return
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
if webauthn?
|
124
|
-
run "bin/importmap pin stimulus-web-authn" if importmaps?
|
125
|
-
run "yarn add stimulus-web-authn" if node?
|
126
|
-
end
|
118
|
+
def install_javascript
|
119
|
+
return unless webauthn?
|
120
|
+
copy_file "javascript/controllers/application.js", "app/javascript/controllers/application.js", force: true
|
121
|
+
run "bin/importmap pin stimulus-web-authn" if importmaps?
|
122
|
+
run "yarn add stimulus-web-authn" if node?
|
127
123
|
end
|
128
124
|
|
129
125
|
def create_views
|
@@ -235,13 +231,6 @@ class AuthenticationGenerator < Rails::Generators::Base
|
|
235
231
|
options.api? ? "api" : "html"
|
236
232
|
end
|
237
233
|
|
238
|
-
def ratelimit_block
|
239
|
-
<<~CODE
|
240
|
-
# Rate limit general requests by IP address in a rate of 1000 requests per minute
|
241
|
-
config.middleware.use(Rack::Ratelimit, name: "General", rate: [1000, 1.minute], redis: Redis.new, logger: Rails.logger) { |env| ActionDispatch::Request.new(env).ip }
|
242
|
-
CODE
|
243
|
-
end
|
244
|
-
|
245
234
|
def omniauthable?
|
246
235
|
options.omniauthable? && !options.api?
|
247
236
|
end
|
@@ -281,4 +270,11 @@ class AuthenticationGenerator < Rails::Generators::Base
|
|
281
270
|
def node?
|
282
271
|
Rails.root.join("package.json").exist?
|
283
272
|
end
|
273
|
+
|
274
|
+
def ratelimit_block
|
275
|
+
<<~CODE
|
276
|
+
# Rate limit general requests by IP address in a rate of 1000 requests per minute
|
277
|
+
config.middleware.use(Rack::Ratelimit, name: "General", rate: [1000, 1.minute], redis: Redis.new, logger: Rails.logger) { |env| ActionDispatch::Request.new(env).ip }
|
278
|
+
CODE
|
279
|
+
end
|
284
280
|
end
|
@@ -29,9 +29,7 @@
|
|
29
29
|
</div>
|
30
30
|
<%- end -%>
|
31
31
|
<%- if masqueradable? %>
|
32
|
-
|
33
|
-
<%%= button_to "Signin as last user", user_masquerade_path(User.last) %>
|
34
|
-
</div>
|
32
|
+
<%%= button_to "Signin as last user", user_masquerade_path(User.last) %>
|
35
33
|
<%- end -%>
|
36
34
|
|
37
35
|
<h2>Access history</h2>
|
@@ -47,6 +45,4 @@
|
|
47
45
|
|
48
46
|
<br>
|
49
47
|
|
50
|
-
|
51
|
-
<%%= button_to "Log out", Current.session, method: :delete %>
|
52
|
-
</div>
|
48
|
+
<%%= button_to "Log out", Current.session, method: :delete %>
|
@@ -15,9 +15,7 @@
|
|
15
15
|
|
16
16
|
<div>
|
17
17
|
<p><strong>Don't have your phone?</strong></p>
|
18
|
-
<div>
|
19
|
-
<%%= link_to "Use a recovery code to access your account.", new_two_factor_authentication_challenge_recovery_codes_path %>
|
20
|
-
</div>
|
18
|
+
<div><%%= link_to "Use a recovery code to access your account.", new_two_factor_authentication_challenge_recovery_codes_path %></div>
|
21
19
|
<%- if webauthn? %>
|
22
20
|
<%% if @user.security_keys.exists? %>
|
23
21
|
<div><%%= link_to "Use a security key to access your account.", new_two_factor_authentication_challenge_security_keys_path %></div>
|
@@ -7,4 +7,12 @@
|
|
7
7
|
|
8
8
|
<br>
|
9
9
|
|
10
|
-
|
10
|
+
<div>
|
11
|
+
<%%= link_to "Add security key", new_two_factor_authentication_profile_security_key_path %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<br>
|
15
|
+
|
16
|
+
<div>
|
17
|
+
<%%= link_to "Back", root_path %>
|
18
|
+
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<p><strong>You must hit the link below to confirm that you received this email.</strong></p>
|
6
6
|
|
7
|
-
|
7
|
+
<p><%%= link_to "Yes, use this email for my account", identity_email_verification_url(sid: @signed_id) %></p>
|
8
8
|
|
9
9
|
<hr>
|
10
10
|
|
@@ -1,12 +1,8 @@
|
|
1
1
|
import { Application } from "@hotwired/stimulus"
|
2
|
-
<%- if webauthn? -%>
|
3
2
|
import WebAuthnController from "stimulus-web-authn"
|
4
|
-
<%- end -%>
|
5
3
|
|
6
4
|
const application = Application.start()
|
7
|
-
<%- if webauthn? -%>
|
8
5
|
application.register("web-authn", WebAuthnController)
|
9
|
-
<%- end -%>
|
10
6
|
|
11
7
|
// Configure Stimulus development experience
|
12
8
|
application.debug = false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authentication-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.16.
|
4
|
+
version: 2.16.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nixon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -94,7 +94,7 @@ files:
|
|
94
94
|
- lib/generators/authentication/templates/erb/user_mailer/invitation_instructions.html.erb.tt
|
95
95
|
- lib/generators/authentication/templates/erb/user_mailer/password_reset.html.erb.tt
|
96
96
|
- lib/generators/authentication/templates/erb/user_mailer/passwordless.html.erb.tt
|
97
|
-
- lib/generators/authentication/templates/javascript/controllers/application.js
|
97
|
+
- lib/generators/authentication/templates/javascript/controllers/application.js
|
98
98
|
- lib/generators/authentication/templates/mailers/user_mailer.rb.tt
|
99
99
|
- lib/generators/authentication/templates/migrations/create_email_verification_tokens_migration.rb.tt
|
100
100
|
- lib/generators/authentication/templates/migrations/create_events_migration.rb.tt
|