AzLink icon indicating copy to clipboard operation
AzLink copied to clipboard

nLogin integration does not register premium and Bedrock auto-login players

Open voidvalue-dev opened this issue 4 months ago • 3 comments

Description

When nLogin premium auto-login is enabled, premium players bypass the /register command. AzLink currently only listens to nLogin's RegisterEvent, so these players are never created in Azuriom.

The same problem may affect Bedrock players authenticated through BedrockLoginEvent.

This prevents those players from using Shop guest purchases because the Shop username login requires the player to already exist in Azuriom's users table.

Environment

  • Azuriom: 1.2.12
  • AzLink: 1.3.13
  • nLogin: 2.0.19
  • Platform: BungeeCord-compatible proxy (NullCordX)
  • Java: 22
  • Shop guest purchases: enabled
  • Premium auto-login: enabled

Steps to reproduce

  1. Enable premium auto-login in nLogin.
  2. Use a premium player that does not already exist in Azuriom.
  3. Join the server.
  4. nLogin authenticates the player automatically without /register.
  5. Check the Azuriom users table or try Shop guest login with that username.

Current behavior

The player is not created in Azuriom because NLoginIntegration only handles RegisterEvent.

Non-premium players that execute /register are synchronized correctly.

Expected behavior

A player successfully authenticated through PremiumLoginEvent should be created or updated in Azuriom using:

  • Minecraft username
  • verified UUID
  • IP address
  • nullable email
  • no password, allowing Azuriom to generate a random password

BedrockLoginEvent should probably use the same flow.

Suggested implementation

  • Listen to PremiumLoginEvent and optionally BedrockLoginEvent.
  • Add a registration method that supports a missing password.
  • Do not send the password JSON property when it is null, so Azuriom can generate a random password.
  • Make registration idempotent by UUID/game_id because premium login events may be fired on every connection.
  • Apply the behavior consistently to Bukkit, BungeeCord and Velocity integrations.

A companion change may be needed in Azuriom's register endpoint. It currently validates name and game_id as unique before checking whether a user with that game_id already exists, so the existing update branch appears unreachable for already synchronized players.

voidvalue-dev avatar Aug 02 '26 19:08 voidvalue-dev

@nickuc I'm not sure if you'll agree with me, but I think this is useful when the store is configured like Tebex, where users don't need to register or log in with a password.

voidvalue-dev avatar Aug 02 '26 20:08 voidvalue-dev

@nickuc I'm not sure if you'll agree with me, but I think this is useful when the store is configured like Tebex, where users don't need to register or log in with a password.

Hi, @voidvalue-dev!

As a temporary solution, you can force registration for Bedrock and premium players by disabling the following options:

autologin:
  bedrock:
    # Sets whether Bedrock players should skip registration.
    # - It is recommended to disable this option if you use player passwords
    #   in a web integration (e.g. server site).
    skip-register: false

  premium:
    # Defines whether premium players should skip registration.
    # - It is recommended to disable this option if you use player passwords
    #   in a web integration (e.g. server site).
    skip-register: false

This will trigger RegisterEvent and ensure AzLink works correctly.

nickuc avatar Aug 07 '26 20:08 nickuc

@nickuc I'm not sure if you'll agree with me, but I think this is useful when the store is configured like Tebex, where users don't need to register or log in with a password.

Hi, @voidvalue-dev!

As a temporary solution, you can force registration for Bedrock and premium players by disabling the following options:

autologin: bedrock: # Sets whether Bedrock players should skip registration. # - It is recommended to disable this option if you use player passwords # in a web integration (e.g. server site). skip-register: false

premium: # Defines whether premium players should skip registration. # - It is recommended to disable this option if you use player passwords # in a web integration (e.g. server site). skip-register: false This will trigger RegisterEvent and ensure AzLink works correctly.

Okay thanks. If you need help test it, message me on my Discord: el_srgatito

voidvalue-dev avatar Aug 08 '26 00:08 voidvalue-dev