티스토리 수익 글 보기
{{ message }}
ReAuth: resolve fatal, code cleanup #567
Merged
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?
See #565, #566
This centralises the provider selection into it’s own method for clarity around it’s logic, resolving a fatal error in the process, but replacing it with a dead-end
Cheating huh?style error. This error condition should not be possible to be hit under normal circumstances.More importantly, this adds Session metadata helpers (That should probably be provided by core) for retrieving/updating the current user session.
Through that, the 2fa-session flag is cleared upon the providers being disabled.
Why?
In comparison to #566 this resolves the underlying fatal in a way that can’t be reintroduced, fixes some merge bugs (ie.
get_class( $provider )is replaced by$provider->get_key()), and reduces code duplication.The unit test from #566 is included.
How?
Testing Instructions
See #565 #566
Screenshots or screencast
Changelog Entry
N/A – Bugfix for unreleased feature.