rodauth 2.39.0 → 2.40.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b8c2b404f5a8fad1607ba2bfd64ec4e03579a909ea324a0c9cda7705d9e79f7
4
- data.tar.gz: bb2e8dcf2c4afa1d855379b69845c6d5efff8e097b5e95b38a11948c8d381d5d
3
+ metadata.gz: c1a80af909390a66924a6a3317b9234cd7b99032878b4ffd794fe621fba48b6d
4
+ data.tar.gz: cba66489bfb59d011d4d960b9b6f2d9c6c1f3f606661467ea888f6072d2f272b
5
5
  SHA512:
6
- metadata.gz: 4316cb199e760aaa144e7c1b154f974f514abdea83b5a18d4f85dd01ff64a9d8c030fd028cee8c27c00d3402a951571b3ae1379ca7ef8653c991df47035ef5c7
7
- data.tar.gz: 0f1fa083577edf23a8db579ab5df5c9ef0d6087c97a7d2cea2c1ef7071049e495d3f374f5657194db4d6feef2252bb708f85af3a1a66e7f116185406db488984
6
+ metadata.gz: f220a837ca8a81984accd87b52725633de82b7ea3452bf91bb3a43c529e4d03a785c6fccd4e5dc6c729a3f1fe33b8a8d535c25060c884dd38ef94c07d21f52ce
7
+ data.tar.gz: 91d278bf3d9e1f1eaa47ff77c98506581ece39b9ad61d6aa5588e98faf65261f804154980a8416d63cec77fe462fff2ce9e8e1186f1fcaf608f3703a94fed818
@@ -52,6 +52,7 @@ module Rodauth
52
52
  :otp_unlock_auth_success,
53
53
  :otp_unlock_available?,
54
54
  :otp_unlock_deadline_passed?,
55
+ :otp_unlock_not_available_set_refresh_header,
55
56
  :otp_unlock_refresh_tag,
56
57
  )
57
58
 
@@ -72,6 +73,7 @@ module Rodauth
72
73
  if otp_unlock_available?
73
74
  otp_unlock_view
74
75
  else
76
+ otp_unlock_not_available_set_refresh_header
75
77
  otp_unlock_not_available_view
76
78
  end
77
79
  end
@@ -201,6 +203,7 @@ module Rodauth
201
203
  end
202
204
 
203
205
  def otp_unlock_refresh_tag
206
+ # RODAUTH3: Remove
204
207
  "<meta http-equiv=\"refresh\" content=\"#{(otp_unlock_next_auth_attempt_after - Time.now).to_i + 1}\">"
205
208
  end
206
209
 
@@ -224,6 +227,10 @@ module Rodauth
224
227
  otp_unlock_data ? otp_unlock_data[otp_unlock_num_successes_column] : 0
225
228
  end
226
229
 
230
+ def otp_unlock_not_available_set_refresh_header
231
+ response.headers["refresh"] = ((otp_unlock_next_auth_attempt_after - Time.now).to_i + 1).to_s
232
+ end
233
+
227
234
  private
228
235
 
229
236
  def show_otp_auth_link?
@@ -50,6 +50,7 @@ module Rodauth
50
50
  :reset_password_email_link,
51
51
  :reset_password_key_insert_hash,
52
52
  :reset_password_key_value,
53
+ :reset_password_request_for_unverified_account,
53
54
  :set_reset_password_email_last_sent
54
55
  )
55
56
  auth_private_methods(
@@ -73,9 +74,7 @@ module Rodauth
73
74
  throw_error_reason(:no_matching_login, no_matching_login_error_status, login_param, no_matching_login_message)
74
75
  end
75
76
 
76
- unless open_account?
77
- throw_error_reason(:unverified_account, unopen_account_error_status, login_param, unverified_account_message)
78
- end
77
+ reset_password_request_for_unverified_account unless open_account?
79
78
 
80
79
  if reset_password_email_recently_sent?
81
80
  set_redirect_error_flash reset_password_email_recently_sent_error_flash
@@ -174,6 +173,10 @@ module Rodauth
174
173
  end
175
174
  end
176
175
 
176
+ def reset_password_request_for_unverified_account
177
+ throw_error_reason(:unverified_account, unopen_account_error_status, login_param, unverified_account_message)
178
+ end
179
+
177
180
  def remove_reset_password_key
178
181
  password_reset_ds.delete
179
182
  end
@@ -6,7 +6,7 @@ module Rodauth
6
6
  MAJOR = 2
7
7
 
8
8
  # The minor version of Rodauth, updated for new feature releases of Rodauth.
9
- MINOR = 39
9
+ MINOR = 40
10
10
 
11
11
  # The patch version of Rodauth, updated only for bug fixes from the last
12
12
  # feature release.
@@ -2,4 +2,3 @@
2
2
  <p>#{rodauth.otp_unlock_required_consecutive_successes_label}: #{rodauth.otp_unlock_auths_required}</p>
3
3
  <p>#{rodauth.otp_unlock_next_auth_attempt_label}: #{rodauth.otp_unlock_next_auth_attempt_after.strftime(rodauth.strftime_format)}</p>
4
4
  <p>#{rodauth.otp_unlock_next_auth_attempt_refresh_label}</p>
5
- #{rodauth.otp_unlock_refresh_tag}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.39.0
4
+ version: 2.40.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
@@ -402,7 +402,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
402
402
  - !ruby/object:Gem::Version
403
403
  version: '0'
404
404
  requirements: []
405
- rubygems_version: 3.6.7
405
+ rubygems_version: 3.6.9
406
406
  specification_version: 4
407
407
  summary: Authentication and Account Management Framework for Rack Applications
408
408
  test_files: []