authentication-zero 2.16.25 → 2.16.26

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
  SHA256:
3
- metadata.gz: 7e2f92cea6894605d40f9db5bad75a4cb227a89043a19f8fe79172b83731b226
4
- data.tar.gz: 85801b84481982cabfc5d1bbbbc554893d4597ed70a7550f1f4e299f8b4b81ae
3
+ metadata.gz: 31829b8815a7d6b7720997ea3cc1e85d602b43c3a2a4da30c346638617adfdb2
4
+ data.tar.gz: 1869578bdefc46e75910a53c3d6a65326255ec63ed0f7b5ceb11612e8b748b35
5
5
  SHA512:
6
- metadata.gz: cc3bddc51a3cbe07dc2dd990ae65b9692699f3dad8d370da99952ee7cedb3c6d31699ee7804e5c0b5b0ff8a8e5b05182a9a1c40d58d04c364d7171f53c193b8d
7
- data.tar.gz: 07bccc4f5eb51fac1da60e82bd3f819f2b29aec97085d73fd13d819ed69b81a704b12bd866e2340b6641ee860563d49a67bea43854a2efa0da23004c9501a598
6
+ metadata.gz: 9134009142fed3d0f971887a21755c85369dd81f3896bb9aa6141b14a600c095ad7a16a45fd2efa69c83a10d3239450bde10300b21ac38fbfa396ae73e0cd5aa
7
+ data.tar.gz: c6647adbf7164587702ca53b4bda230c835ed53112172551c7f3f5555224f722c5f69e8511d37a5b59983a78a4d5bc778d6fbe2a556f73460b0f900893081441
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (2.16.25)
4
+ authentication-zero (2.16.26)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "2.16.25"
2
+ VERSION = "2.16.26"
3
3
  end
@@ -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 install_javascript_dependencies
119
- return if options.api?
120
-
121
- template "javascript/controllers/application.js", "app/javascript/controllers/application.js", force: true
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
- <div>
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
- <div>
51
- <%%= button_to "Log out", Current.session, method: :delete %>
52
- </div>
48
+ <%%= button_to "Log out", Current.session, method: :delete %>
@@ -24,3 +24,9 @@
24
24
  <%%= form.submit "Send an invitation" %>
25
25
  </div>
26
26
  <%% end %>
27
+
28
+ <br>
29
+
30
+ <div>
31
+ <%%= link_to "Back", root_path %>
32
+ </div>
@@ -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>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <ul><%%= render @recovery_codes %></ul>
7
7
 
8
- <%%= link_to "OK, I'm done", root_path %>
8
+ <div><%%= link_to "OK, I'm done", root_path %></div>
9
9
 
10
10
  <hr>
11
11
 
@@ -7,4 +7,12 @@
7
7
 
8
8
  <br>
9
9
 
10
- <%%= link_to "Add security key", new_two_factor_authentication_profile_security_key_path %>
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>
@@ -36,3 +36,9 @@
36
36
  <%%= form.submit "Verify and activate" %>
37
37
  </div>
38
38
  <%% end %>
39
+
40
+ <br>
41
+
42
+ <div>
43
+ <%%= link_to "Back", root_path %>
44
+ </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
- <%%= link_to "Yes, use this email for my account", identity_email_verification_url(sid: @signed_id) %>
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
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p>You requested a magic sign-in link. Here you go:</p>
4
4
 
5
- <%%= link_to "Sign in without password", edit_sessions_passwordless_url(sid: @signed_id) %>
5
+ <p><%%= link_to "Sign in without password", edit_sessions_passwordless_url(sid: @signed_id) %></p>
6
6
 
7
7
  <hr>
8
8
 
@@ -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.25
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-13 00:00:00.000000000 Z
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.tt
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