Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2FA verification via link not working correctly #26837

Merged
merged 2 commits into from Jan 31, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Jan 30, 2024

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 was RequiresSecondFactorAuth, 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 full Online. 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.

Closes ppy#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 was
`RequiresSecondFactorAuth`, 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 full
`Online`. 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
(ppy#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.
@bdach bdach added the next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! label Jan 31, 2024
@peppy peppy self-requested a review January 31, 2024 09:36
Copy link
Sponsor Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well here.

@peppy peppy merged commit 56700d6 into ppy:master Jan 31, 2024
15 of 17 checks passed
@bdach bdach deleted the 2fa-not-verifying-via-link branch January 31, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! size/S type:online
Projects
Development

Successfully merging this pull request may close these issues.

Clicking on link in 2FA mail doesn't make the game get past 2FA verification
2 participants