Menu

Authenticated UUID


The Authenticated UUID feature allows you to secure your game by requiring a signed JWT (JSON Web Token) containing the player's uuid. This ensures only trusted, verified users can access and interact with your game.

Step 1: Generate your UUID Secret Key

1. In Flarie Studio, go to Access Keys.
2. Create a new UUID Secret Key.
3. This key will be used to sign JWT tokens that authenticate your players.

Note! Keep this key safe, it acts as your private signing key.

access_keys

 

Step 2: Set UUID as the Player Identifier

1. Go to your game in Flarie Studio.
2. Navigate to Game Settings → Add Data Collection.
3. Under Unique Identifier, choose URL Parameter.
4. This will enable uuid as a required parameter in your game URL.

Note: The game will not start unless a valid uuid is passed via the query string.

uuid

Step 3: Enable Authenticated UUID

When Authenticated UUID is enabled, your game requires the uuid query parameter to be a signed JWT token.

uuid-2

JWT Format

Header

{
  "alg": "HS256",
  "typ": "JWT"
}

Payload

{
  "uuid": "example-player-uuid"
}

Signature

Signed using your UUID Secret Key (the one you generated in Step 1).

 

Example (Node.js)

const jwt = require('jsonwebtoken');

const uuid = 'player-1234-abcd';
const secretKey = 'YOUR_UUID_SECRET_KEY'; // Replace with your actual key

const token = jwt.sign({ uuid: uuid }, secretKey, { algorithm: 'HS256' });

const gameUrl = `https://your-game-url.com?uuid=${token}`;

console.log(gameUrl);

What happens at Runtime? 

Every time a player takes an action in your game, Flarie will:

  • Verify that the uuid JWT is valid

  • Confirm that the token was signed with your UUID Secret Key

  • Reject any access attempts with invalid or tampered tokens

This ensures that only authenticated users can interact with your game content.