Support optional online-mode auth for Bedrock players#657
Open
CristianVGdev wants to merge 1 commit intoGeyserMC:masterfrom
Open
Support optional online-mode auth for Bedrock players#657CristianVGdev wants to merge 1 commit intoGeyserMC:masterfrom
CristianVGdev wants to merge 1 commit intoGeyserMC:masterfrom
Conversation
Add allow-online-mode-authentication option and plumbing to support letting Bedrock players authenticate in online mode while retaining Floodgate API behavior. Introduces a new config property, documents it in proxy-config.yml, and changes Bungee/Velocity listeners to avoid forcing offline mode when enabled. Adds a short-lived connection->player cache and sets the online-mode profile on FloodgatePlayerImpl after authentication. FloodgatePlayerImpl now stores an optional online-mode UUID/username and uses it for getCorrectUniqueId/getCorrectUsername and BedrockData.
This comment was marked as off-topic.
This comment was marked as off-topic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces support for allowing Bedrock players to authenticate in online mode when using Floodgate, controlled by a new configuration option. The changes ensure that player profile information is handled correctly in both online and offline modes, and update the listeners and player implementation to support this behavior.
Online Mode Authentication Support:
allow-online-mode-authenticationtoproxy-config.ymlandProxyFloodgateConfig, enabling Bedrock players to authenticate in online mode when desired. [1] [2]BungeeListenerandVelocityListenerto check the new config option and handle player authentication and caching accordingly, ensuring correct player profile assignment for both modes. [1] [2] [3]Player Profile Handling:
FloodgatePlayerImplto store and use online mode UUID and username, including methods to set and retrieve the correct profile based on authentication mode. [1] [2]FloodgatePlayerImpl.toBedrockData()to forward linked player information when online mode authentication is used.Listener and Dependency Updates:
ProxyFloodgateConfigintoBungeeListenerand updated imports to support new features and player handling. [1] [2]BungeeListenerto temporarily store player data for online mode authentication scenarios.Note
This is an attempt to address issue #634. From a code perspective the changes should make sense, but I cannot guarantee that it works correctly in practice.
I personally do not use Velocity and my setup is based on Spigot, so this implementation was not tested in a real Velocity environment. The goal of this PR is mainly to provide a possible direction or reference implementation for supporting online mode authentication with Floodgate.
If someone who actively uses Velocity can test it and confirm whether it behaves correctly, that would be very helpful.
Probably:
Fixes #634