Player Connections

Connecting the Player Ident to a Nodecraft user.

When your players create a Game Server with Nodecraft Studio they still need a Nodecraft.com account to make a purchase, contact customer support, or setup their game server. There are several components of this which will be moved in-game for Studio on our roadmap.

In order to securely connect a Player Ident to a Nodecraft User we have defined the Player Connections process. As an overview the Player will get a special QR code link to login at Nodecraft.com, optionally getting a challenge code to enter in-game. Once completed, it will redirect the browser session to the respective nodecraft.com url and link their in-game identity.

Player Connection Flow

This process once started has a 15 minute window to complete the Player Connection for user security.

Player Connection Flow diagram

As shown above, the process flow is broken into a few core concepts:

Once the backend has defined if this requires a challenge or is a first time connecting to a Nodecraft.com account, it may present a challenge. This process requires the in-game UI to perform a long-poll strategy using the Get Connection API endpoint every 2-5 seconds.

Challenge Code

screenshot of code request & mobile code

This example shows the game on the left and a mobile example of the opened link on the right.

Once a code_challenge is presented, the UI should collect the Auth Code from the browser as shown above. The long-poll should continue to persist in the background in case the status changes, again for any security changes designated by the Consume Challenge Response Player Challenge API.

Completed

completed player connection

Once completed the in-game UI can cease the long-poll. It should also require the user to close it. Once closed, the UI should refresh the Private server list to reflect any changes occurring from the browser session.

Security Considerations

This process has several security considerations, which are processed serverside from the Nodecraft Studio API and may present a challenge code when its security system is triggered. We don't publically list the reasons this may occur, but we recommend you pay close attention to the status of the Player Connection status.