Attract ModeDeveloper workspace ↗

Attract Mode / Developers

Connect accounts without guessing the contract.

Request reviewed Attract Mode OAuth and OpenID Connect integration, register exact callbacks, and protect player sessions with PKCE, state and token validation.

Can players use Attract Mode accounts in my browser game?

Yes, through a reviewed OAuth 2.0 authorization-code integration with PKCE S256 and OpenID Connect. Your game needs an approved client, exact registered callback URLs and a server that handles the code exchange and session. Third-party games require player consent.

You can run the kit’s offline simulation before registration. It demonstrates the interface and session flow without contacting Attract Mode. Real sign-in and a Connected label require separate registration and testing.

Request a client for your game

In the developer workspace, choose Add sign-in. Include the game and studio names, playable URL, production origin, exact callback URLs, server stack, the player information you need and evidence that you represent the game. Use notes for staging callbacks, requested scopes, privacy and deletion-policy links and existing-account migration plans. You can download the request template and send it to hello@attractmode.io if you cannot use the workspace.

Save the request while preparing your backend, then submit it. Read review notes in the same request and resubmit if changes are requested. Registration is reviewed, not automatic. Approval is permission to proceed with the recorded plan; it is not a working login until configuration is delivered and the integration is tested.

Each approved third-party game receives its own registered client. Credentials are delivered through a separately agreed private channel. Never put a client secret into request notes, a screenshot, a repository or an issue. Do not reuse another game’s client or infer scopes from internal account routes.

What should I prepare before requesting registration?

Have a playable game URL, the relevant game and studio listing URLs, and a verified representative. Include your backend stack, production and staging callback URLs, requested scopes, privacy and deletion policies, and an integration contact. The kit’s account-integration guide has the complete request checklist.

Start with openid when you only need a stable account key. Request profile only for an approved display-name or avatar use. Email needs its own justification. Keep guest play separate from account linking, and explain how existing players retain their progress.

Plan server-only durable storage with expiry and atomic one-use transaction handling. The kit’s bounded in-memory store and loopback demo server are development tools. A production deployment also needs HTTPS, secure cookies, rate limits and a reviewed session lifecycle.

Use the registered OpenID Connect configuration

The identity issuer is https://dupwygdktojsuuzatmih.supabase.co/auth/v1. Use its discovery document and the client configuration supplied after review. The browser-game kit demonstrates authorization code flow with PKCE S256, state and nonce. Only request the scopes approved for your client.

Store the PKCE verifier, random state and nonce in a short-lived server-side session tied to the initiating browser. Redirect to the discovered authorization endpoint with the exact registered callback. On return, reject a missing or mismatched state, an expired flow and reused authorization codes.

Exchange the code on your backend. Validate ID token signature, issuer, audience, expiry and nonce using the issuer’s current keys. Use the issuer and stable subject together as the player account identifier. Do not link existing game accounts simply because their email addresses match.

Keep the session on your side

Create a secure HttpOnly session for your own game after validation. Protect state-changing requests against CSRF. Keep secrets and provider tokens out of browser bundles, URLs, analytics, logs and local storage. Do not ask players for their Attract Mode password.

Third-party players review consent. First-party consent exceptions do not carry over to other publishers. Do not iframe the login page or attempt to read cookies from another domain. Handle declined consent, account switching, revoked authorization and expired sessions. Make local sign-out clear; it should end your game’s session.

Test before asking for the connected label

Check new and returning players, enabled social providers, consent acceptance and cancellation, incorrect state and verifier, expired and replayed codes, account switching and sign-out. Test mobile Safari and Chrome as well as desktop browsers.

Send the build and test evidence to the team. A verified listing alone does not make a game an Attract Mode account integration. Only registered and tested integrations receive the connected label.

Identity is the current boundary

The account integration identifies a consenting player. Approved launch integrations can also use Stage 2 progression with a separate scoped server credential. Saves, achievements and XP belong to that game and environment; there is no cross-game save or global XP API. Friends, playtime, purchases and entitlements remain unavailable. Use the published kit contract, never undocumented internal endpoints.

Understand the review status

Draft: saved privately, not sent for review. Submitted: waiting for the team to review. Changes requested: read the review note, edit the same request and submit it again. Approved: the request passed review, but delivery still needs to happen. Declined: read the explanation before deciding what to do next. Fulfilled: the team has recorded the actual outcome. Check the outcome link and review note.

Approval alone does not put a listing online, create OAuth credentials or schedule testers. The recorded outcome explains what was delivered. Keep each request focused on one game and one goal. You can send separate listing, sign-in and playtest requests for the same game.

Configure your game and environment

After studio and game ownership approval, open the sign-in task in the developer workspace. Save exact callback URLs against the correct game and environment. Owners and editors may change drafts; read-only members cannot grant access.

Saved configuration is not a registered OAuth client. Independent operator review is required for production. Changing callbacks clears approval. Registry revocation stops supported kit sessions; revoke provider credentials and grants separately if compromised.

Check your setup before connecting players

Run npm run doctor in the kit for redacted configuration checks. Workspace checks inspect saved settings, not a real login. Test the protocol in the isolated local sandbox, then verify the approved client on its actual deployment.

Connected kit releases require AM_GAME_ID and a persistent private AM_PLAYER_ID_KEY alongside OAuth configuration. This key derives stable game-scoped player identifiers. Keep it server-side and back it up securely. Follow the migration guide before rotation; never include it in a frontend, support message or public repository.

Keep players in control

Third-party sign-in requires consent. Preserve guest gameplay when the account service is unavailable. Never merge identities because email addresses match.

The kit checks current registration at login, callback and session lookup. These checks complement token validation; they do not prove a player earned a score. Early-access progression requires an approved launch integration and scoped server credential. The game backend must validate gameplay before submitting trusted events; client-reported progress stays separate.

Add game progression after account approval

Stage 2 progression is early access for approved launch integrations. In the developer workspace, open your approved launch project and issue a progression credential with only the scopes your backend needs. Store it as a server secret. Credentials expire and can be revoked; project configuration changes invalidate older credentials.

Your browser calls your own same-origin backend. The backend resolves the signed-in player and calls POST https://attractmode.io/api/progression. Use the browser-game kit progression adapter and docs/progression.md for the request contract, save-conflict UI and validation examples. Never send the credential to browser JavaScript or accept a player ID supplied by the browser.

Cloud saves use revision checks and retain five revisions per slot. Achievements, XP, levels and statistics are scoped to one game and environment. Leaderboards are private until a player opts in. Client-reported and server-validated results stay separate; there is no global XP or cross-game save API.

For trusted rewards, validate the result on your game backend and retain a stable event ID, business key and sequence for retries. Replaying an accepted event does not award it again. A fresh event ID cannot repeat the same accepted business completion. These checks prevent duplicate grants; they do not prove that your game validator is honest or cheat-proof.

Start with sandbox credentials and test login, logout, rejected events, duplicate retries, save conflicts and credential revocation before using production. Early access has protective storage and request limits. A local test is not evidence of a hosted external pilot.

Example source files

Open developer workspace ↗

Download request template (text) ↗

Download request template (JSON) ↗

Real local OAuth sandbox guide ↗