
A Node.js backend server hosts the web page for authentication and runs server-side JavaScript to securely handle the authentication process.
When the game initiates authentication, it opens the player’s browser, prompting them to connect their MetaMask crypto wallet, which contains the unique NFT token. To verify ownership, a signing request is triggered, ensuring that the wallet address truly belongs to the player. This step adds an extra layer of security and verification.
The backend server then checks whether the player holds the required NFT token. If ownership is confirmed, the server generates a JWT token, which is displayed in the browser session.
The player copies this JWT token into the game, completing the authentication process. Upon successful verification, access to the game is granted.
