Menu
 

Player Authentication for Dedicated-Server Games

Player Authentication for Dedicated-Server Games

Authentication in a server-based game has to satisfy two goals at once: frictionless entry for the player and clear trust boundaries between clients, servers, and operators. Supercraft GSB handles that with guest sessions, recoverable accounts, external provider linking, and dedicated server credentials that never pretend to be player accounts.

What the Player Flow Looks Like

Stage Why It Exists
Anonymous session Let the player start immediately without killing the first-session conversion rate.
Upgrade guest Bind a recoverable identity before the player changes device or loses the session.
OAuth link or login Use provider identities without rebuilding the full auth UX yourself.
JWT issuance Give the client a clean, scoped token for the player-facing API surface.

Core Supercraft GSB Auth Endpoints

POST /auth/register
POST /auth/login
POST /auth/anonymous
POST /auth/upgrade-guest
POST /auth/logout
POST /auth/revoke-all-tokens

This model is useful because it avoids the common anti-pattern of choosing between only anonymous and full account wall on day one. You can get the player moving first, then ask for durable identity at the point where it matters.

OAuth and External Identity

GSB supports provider-based flows with consistent operations for initiate, callback, link, unlink, and connection listing. That means the auth model stays predictable even when the identity provider changes.

Product rule: external providers should strengthen account recovery and portability, not become the only place where player identity is stored.

Roblox Verification

For Roblox-connected flows, GSB includes a verification endpoint so a game server can confirm identity before granting backend-backed progression or economy actions. That matters when Roblox gameplay needs to participate in a shared backend instead of living as an isolated island.

Roblox-specific follow-up: if you are wiring Roblox server scripts into an external auth or progression platform, read Roblox HttpService for External Backends and Roblox Cross-Experience Progression.

Players and Servers Must Not Share Credentials

Dedicated servers use Server Tokens, not player JWTs. That design is not cosmetic. It prevents common mistakes like letting a compromised client act like the authoritative game server or giving moderation tools player-level tokens with the wrong scope.

  • Player JWTs: scoped for player-safe reads and writes.
  • Server Tokens: scoped for runtime authority and server-side game logic.
  • API Keys: scoped for operators, tooling, support, and admin workflows.

Recommended Integration Pattern

  1. Start the player anonymously for the first session.
  2. Create progression documents immediately under that player identity.
  3. Prompt for upgrade before purchase, trade, or cross-device continuity matters.
  4. Issue player JWTs to the client and keep server tokens on the dedicated server only.

Related in This Hub

If you want this auth model without rebuilding the stack from scratch, start with Supercraft Game Server Backend.

Top