Skip to main content
PlayFlow supports authenticating players who connect through the Lobby and Matchmaking system. You configure an auth provider in your project settings, and PlayFlow validates player identity tokens before allowing lobby and matchmaking operations.

How It Works

When a player connects to a lobby or enters matchmaking, their game client sends an identity token in the x-player-token header. PlayFlow validates that token against your configured provider, creates or updates a player record, and grants access to the session.
1

Configure your auth provider

Choose a provider in Project Settings > Player Authentication on the dashboard, or via the API.
2

Get a token from your auth provider

Your game client authenticates with your chosen provider and receives a token — a JWT, PlayFab entity token, or Steam session ticket.
3

Send the token with requests

Include the token in the x-player-token header when your client connects to lobbies or matchmaking.
4

PlayFlow validates and tracks the player

PlayFlow verifies the token, creates or updates a player record with the provider’s user ID, and grants access. You can view authenticated players in the Players tab on the dashboard.

Auth Providers

PlayFlow supports four authentication providers. Choose the one that matches your game’s identity system.
No server-side verification. The value of the x-player-token header is used directly as the player identifier. If no header is provided, the request passes through without authentication.This is the default for all projects. It is suitable for development and testing but should not be used in production.

Configuration

No configuration is needed. All new projects start with this provider.
{
  "provider": "none"
}

Behavior

  • The x-player-token header is optional.
  • If a token is provided, its raw value becomes the player’s provider_uid.
  • If no token is provided, the request proceeds without player identity.
None mode performs no verification. Any client can impersonate any player by sending an arbitrary token value. Use a verified provider (Custom JWT, PlayFab, or Steam) before shipping to production.

Dashboard Configuration

You can configure player authentication from the PlayFlow dashboard.
  1. Navigate to your project and open the Settings page.
  2. Find the Player Authentication section.
  3. Select your provider from the dropdown.
  4. Fill in the required fields for your chosen provider.
  5. Click Save.
The configuration takes effect immediately for all new player connections.

API Configuration

You can also configure player authentication programmatically via the engine API.
curl -X POST https://api.playflowcloud.com/api/v3/projects/settings \
  -H "api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "auth_config": {
      "provider": "none"
    }
  }'
You can verify the current configuration by reading your project settings:
curl https://api.playflowcloud.com/api/v3/projects/settings \
  -H "api-key: YOUR_API_KEY"
The response includes your current auth_config alongside other project settings.

Sending the Player Token

Once your provider is configured, your game client must include the player’s identity token in the x-player-token header on every lobby and matchmaking request.
The PlayFlow SDK handles the token header automatically when you set the player token during initialization:
// After authenticating with your provider, pass the token to PlayFlow
string playerToken = GetTokenFromYourAuthProvider();

PlayFlowLobbyManagerV2.Instance.Initialize(playerToken, () => {
    Debug.Log("PlayFlow SDK initialized with authenticated player.");
});

Players Table

Authenticated players are automatically tracked in a per-project players table. Each time a player authenticates, PlayFlow upserts a record with the following fields:
FieldDescription
idUnique player ID (UUID), auto-generated by PlayFlow.
providerThe auth provider that verified this player (none, custom_jwt, playfab, steam).
provider_uidThe player’s identifier from the auth provider (e.g., JWT sub, PlayFab eid, Steam steamid).
display_nameDisplay name extracted from the token, if available.
metadataProvider-specific metadata (e.g., owner_steamid for Steam, title_id for PlayFab).
last_seen_atTimestamp of the player’s most recent authentication.
Players are uniquely identified by the combination of project_id and provider_uid. If the same player authenticates again, their existing record is updated rather than duplicated. You can view your authenticated players in the Players tab on the project dashboard.

Choosing a Provider

Development / Testing

Use None to get started quickly without any auth infrastructure. Switch to a verified provider before launching.

Existing Auth System

Use Custom JWT if you already have an auth provider (Auth0, Firebase, Supabase, Clerk, or any OIDC-compliant service).

PlayFab Games

Use PlayFab if your game uses Microsoft PlayFab for player management and you want native integration.

Steam Games

Use Steam if your game is distributed on Steam and you want to verify player identity through Steam session tickets.

Next Steps