Fix 2FA verification via link not working correctly #26837
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.
Closes #26835.
I must have not re-tested this correctly after all the refactors...
Basically the issue is that the websocket connection would only come online when the API state changed to full
Online
. In particular the connector would not attempt to connect when the API state wasRequiresSecondFactorAuth
, giving the link-based flow no chance to actually work.The change in
WebSocketNotificationsClientConnector
is relevant in that queueing requests does nothing before the API state changes to fullOnline
. It also cleans up things a bit code-wise so... win?And yes, this means that the other
PersistentEndpointClientConnector
implementations (i.e. SignalR connectors) will also come online earlier after this. Based on previous discussions(#25480 (comment)) I think this is fine, but if it is not fine, then it can be fixed by exposing a virtual that lets a connector to decide when to come alive, I guess.