|
| 1 | += Improvements |
| 2 | + |
| 3 | +* When making a change to an account (e.g. changing a login), tokens |
| 4 | + for the account are now cleared or reset. Previously, if you |
| 5 | + requested a password reset, then requested a login change, and then |
| 6 | + changed the login, the password reset link would still be valid |
| 7 | + after the login change was made, until the password reset token |
| 8 | + expired (default: 1 day). If the reason you are chaging your login |
| 9 | + is that you suspect your email may be compromised, you probably |
| 10 | + wouldn't want the reset password link to still be valid after the |
| 11 | + login change. |
| 12 | + |
| 13 | + The following account changes trigger clearing of tokens: |
| 14 | + |
| 15 | + * change login |
| 16 | + * close account |
| 17 | + * reset password |
| 18 | + * unlock account |
| 19 | + * verify account |
| 20 | + |
| 21 | + The following account tokens are cleared upon such changes: |
| 22 | + |
| 23 | + * active sessions (other than logged in session) |
| 24 | + * email auth |
| 25 | + * jwt refresh (if not logged in) |
| 26 | + * lockout (updates token if it exists) |
| 27 | + * remember (creates and uses new remember token if logged in via |
| 28 | + remember token) |
| 29 | + * reset password |
| 30 | + * single session (if not logged in) |
| 31 | + * verify account |
| 32 | + * verify login change |
| 33 | + |
| 34 | + This is a more secure default, and it is expected that it will |
| 35 | + not negatively affect the vast majority of Rodauth installations. |
| 36 | + However, due to Rodauth's very configurable nature, it is possible |
| 37 | + it will cause issues for some installations. |
| 38 | + |
| 39 | += Backwards Compatibility |
| 40 | + |
| 41 | +* If clearing tokens on account change causes problems for your |
| 42 | + application, you can revert to clearing tokens only on account |
| 43 | + close: |
| 44 | + |
| 45 | + clear_tokens do |reason| |
| 46 | + super(reason) if reason == :close_account |
| 47 | + end |
| 48 | + |
| 49 | +* If you were calling after_close_account directly to clear tokens, |
| 50 | + you should now also call: |
| 51 | + |
| 52 | + clear_tokens(:close_account) |
| 53 | + |
| 54 | + As some token clearing now occurs in clear_tokens and not in |
| 55 | + after_close_account. |
0 commit comments