App Launch Tokens
Pass authenticated user identity to your game at launch time
What Are App Launch Tokens?
App Launch Tokens let you pass the authenticated user's identity to your game when the Login System is enabled. The launcher generates a short-lived, single-use token and injects it into the launch arguments — your game's backend verifies it via API to get the user's identity.
How It Works
┌───────────┐ ┌───────────────┐ ┌──────────────┐ ┌──────────────┐
│ Launcher │────>│ GLC Backend │ │ Your Game │────>│ GLC Backend │
│ (Desktop) │ │ /generate │ │ │ │ /verify │
└───────────┘ └───────────────┘ └──────────────┘ └──────────────┘
1. Request 2. Returns 3. Game reads 4. Exchange
token token args at start token for
(60s TTL) user infoLauncher requests a token — Calls the GLC API with the user's session
GLC returns an opaque token — 60-second TTL, single-use
Launcher injects token into launch arguments — Replaces
{{auth_token}}placeholderGame starts and reads the CLI arguments — Extracts the token
Game's backend calls the verify endpoint — Exchanges the token for user identity
Token is consumed — Cannot be reused
Available Placeholders
Configure these in App Settings → Platforms → Launch Arguments:
{{auth_token}}
Short-lived opaque token (60s, 1-use)
{{user_id}}
User's unique ID
{{user_email}}
User's email address
{{user_display_name}}
User's display name
{{instance_id}}
Instance number (multi-instance only)
Example launch arguments:
Your game receives:
{{auth_token}} is the only secure placeholder. The others ({{user_id}}, {{user_email}}, {{user_display_name}}) are passed as plain text and should not be trusted without verification. Always verify the token server-side.
Security Properties
TTL
60 seconds
Usage
Single-use (consumed on first verification)
Scope
Identity only — no access to GLC API
Format
URL-safe Base64 (64 chars)
Cleanup
Expired tokens are purged every 10 minutes
Even if a token is visible in the process arguments, it's useless after 60 seconds and cannot be reused.
API Reference
Verify Token
Called by your game's backend to validate a token and get the user's identity.
Public endpoint — no authentication required.
Body:
Success Response:
Failure Responses:
Integration Example
Your Game (Client Side)
Read the token from command-line arguments at startup and send it to your backend:
Your Game Server (Backend)
Exchange the token for user identity:
Setup
Enable the Login System addon on your app
Go to App Settings → Platforms → Launch Arguments
Enable Custom Launch Arguments
Add placeholders:
--auth-token {{auth_token}} --user-id {{user_id}}Build and deploy your launcher
Implement the
/verifycall in your game's backend
Last updated
Was this helpful?