Skip to content

Keep players logged in across server switches when the pre-join dialog is enabled#3098

Merged
Xephi merged 1 commit into
masterfrom
fix/prejoin-proxy-config-autologin
Jun 27, 2026
Merged

Keep players logged in across server switches when the pre-join dialog is enabled#3098
Xephi merged 1 commit into
masterfrom
fix/prejoin-proxy-config-autologin

Conversation

@sgdc3

@sgdc3 sgdc3 commented Jun 25, 2026

Copy link
Copy Markdown
Member

Problem

With a proxy + autoLogin: true, an already-authenticated player switching back to an auth server gets re-prompted to log in on Paper/Folia backends that have registration.dialog.preJoin.enable: true.

The pre-join dialog is shown during the connection configuration phase, which on a switch fires before the proxy sends perform.login (sent only from ServerConnectedEvent, after configuration completes). The dialog blocks that phase, so the auto-login can't arrive in time and the dialog always wins. Same symptom as #3076 (its perform.login routing part was already fixed in 63dccbf).

Fix

Send the auto-login during the configuration phase and let the backend act on it:

  • Velocity — on PlayerEnteredConfigurationEvent, send the HMAC-signed perform.login to the auth server before the backend shows the dialog (ServerConnectedEvent path kept as backstop).
  • Paper/Folia — new PaperProxyAutoLoginListener handles the configuration-phase PluginMessageListener overload; on a valid perform.login it queues the proxy session and dismisses the dialog (approvePreJoinForceLogin). BungeeReceiver.handleConfigPhasePerformLogin reuses the existing verifyHmac, and PaperDialogFlowListener re-checks the queue after registering the dialog future to close the residual race.

Not yet verified on a live Paper + Velocity network.

Refs #3076

@sgdc3 sgdc3 requested a review from Xephi June 25, 2026 18:58
@sgdc3 sgdc3 assigned Xephi and sgdc3 Jun 25, 2026
@Xephi Xephi merged commit 2761f15 into master Jun 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants