rodauth 2.45.0 → 2.46.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/lib/rodauth/features/change_password.rb +1 -0
- data/lib/rodauth/features/close_account_email.rb +17 -0
- data/lib/rodauth/features/email_base.rb +1 -2
- data/lib/rodauth/features/jwt_refresh.rb +2 -4
- data/lib/rodauth/features/verify_account.rb +11 -2
- data/lib/rodauth/features/webauthn_login.rb +6 -1
- data/lib/rodauth/version.rb +1 -1
- data/templates/close-account-email.str +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5f2f00f0b0ca5043b852e3f544a666c066b5df09445a4d0031351e37d101bdbf
|
|
4
|
+
data.tar.gz: 387de7af25a3d6f4823cc09818d374ff99f1a35ffe8a0329efe107810667cdd6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26088c4dc223cdc9f72a07a0de27bff3a3678b29264a46554733d103106443988ac524553f8afa4cb7a457d0cf51c25646adbdf8bd158a7488db449dfc09f7ee
|
|
7
|
+
data.tar.gz: da69371a181d62e7ebb74274c56503565e64be26a808dede0df3f7b7c1e230efa5442f35d99609c138439703d2f97335968a0ee720c83c9819ae0de363269046
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen-string-literal: true
|
|
2
|
+
|
|
3
|
+
module Rodauth
|
|
4
|
+
Feature.define(:close_account_email, :CloseAccountEmail) do
|
|
5
|
+
depends :close_account, :email_base
|
|
6
|
+
|
|
7
|
+
loaded_templates %w'close-account-email'
|
|
8
|
+
email :close_account, 'Account Closed', :translatable=>true
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
def after_close_account
|
|
13
|
+
super
|
|
14
|
+
send_close_account_email
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -133,12 +133,10 @@ module Rodauth
|
|
|
133
133
|
|
|
134
134
|
def _account_refresh_token_split(token)
|
|
135
135
|
id, token = split_token(token)
|
|
136
|
-
id = convert_token_id(id)
|
|
137
|
-
return unless id && token
|
|
136
|
+
return unless token && (id = convert_token_id(id))
|
|
138
137
|
|
|
139
138
|
token_id, key = split_token(token)
|
|
140
|
-
token_id = convert_token_id(token_id)
|
|
141
|
-
return unless token_id && key
|
|
139
|
+
return unless key && (token_id = convert_token_id(token_id))
|
|
142
140
|
|
|
143
141
|
[id, token_id, key]
|
|
144
142
|
end
|
|
@@ -225,7 +225,7 @@ module Rodauth
|
|
|
225
225
|
end
|
|
226
226
|
|
|
227
227
|
def set_verify_account_email_last_sent
|
|
228
|
-
|
|
228
|
+
verify_account_ds.update(verify_account_email_last_sent_column=>Sequel::CURRENT_TIMESTAMP) if verify_account_email_last_sent_column
|
|
229
229
|
end
|
|
230
230
|
|
|
231
231
|
def get_verify_account_email_last_sent
|
|
@@ -248,7 +248,16 @@ module Rodauth
|
|
|
248
248
|
|
|
249
249
|
def clear_tokens(reason)
|
|
250
250
|
super
|
|
251
|
-
|
|
251
|
+
if reason == :close_account
|
|
252
|
+
remove_verify_account_key
|
|
253
|
+
else
|
|
254
|
+
generate_verify_account_key_value
|
|
255
|
+
hash = {verify_account_key_column=>verify_account_key_value}
|
|
256
|
+
if verify_account_email_last_sent_column
|
|
257
|
+
hash[verify_account_email_last_sent_column] = Time.now - verify_account_skip_resend_email_within - 10
|
|
258
|
+
end
|
|
259
|
+
verify_account_ds.update(hash)
|
|
260
|
+
end
|
|
252
261
|
end
|
|
253
262
|
|
|
254
263
|
private
|
data/lib/rodauth/version.rb
CHANGED
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.
|
|
4
|
+
version: 2.46.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeremy Evans
|
|
@@ -265,6 +265,7 @@ files:
|
|
|
265
265
|
- lib/rodauth/features/change_password.rb
|
|
266
266
|
- lib/rodauth/features/change_password_notify.rb
|
|
267
267
|
- lib/rodauth/features/close_account.rb
|
|
268
|
+
- lib/rodauth/features/close_account_email.rb
|
|
268
269
|
- lib/rodauth/features/confirm_password.rb
|
|
269
270
|
- lib/rodauth/features/create_account.rb
|
|
270
271
|
- lib/rodauth/features/disallow_common_passwords.rb
|
|
@@ -314,6 +315,7 @@ files:
|
|
|
314
315
|
- templates/button.str
|
|
315
316
|
- templates/change-login.str
|
|
316
317
|
- templates/change-password.str
|
|
318
|
+
- templates/close-account-email.str
|
|
317
319
|
- templates/close-account.str
|
|
318
320
|
- templates/confirm-password.str
|
|
319
321
|
- templates/create-account.str
|
|
@@ -403,7 +405,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
403
405
|
- !ruby/object:Gem::Version
|
|
404
406
|
version: '0'
|
|
405
407
|
requirements: []
|
|
406
|
-
rubygems_version: 4.0.
|
|
408
|
+
rubygems_version: 4.0.16
|
|
407
409
|
specification_version: 4
|
|
408
410
|
summary: Authentication and Account Management Framework for Rack Applications
|
|
409
411
|
test_files: []
|