Sync two-factor session meta to newly created sessions #574
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Copies two-factor session information from the current session to newly created sessions.
Fixes #573
Why?
WordPress creates a new session when the user changes their password, for no particular reason.
See https://core.trac.wordpress.org/ticket/58427
See WordPress/wporg-two-factor#191
How?
Testing Instructions
See screen recording. The debug shown is from this change:
Screenshots or screencast
See the Issue for the before.
Note that in the recording the Session token changes, but the metadata remains.
Screen.Recording.2023-05-30.at.3.25.00.pm.mov
Changelog Entry
N/A - Fix for an unreleased change: #528