/xsolla-ai-kit:login-setupfrom xsolla-ai-kit
Integrates Xsolla Login (Xsolla ID, NewID) for game/web authentication: sign-up/sign-in via password, email/SMS, social networks, Steam, Xbox, PSN, Epic, device or custom ID. Covers Login Widget, API, SDK, JWT validation, server tokens, account linking, MFA, and password reset.
Ships in xsolla-ai-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill is a draft authored by the Login SME (@mohammed_abujalala).
Detailed material lives in references/:
references/setup-pa.md — Publisher Account configuration: standard vs shadow Login project, OAuth 2.0 clients (public, confidential, server), callback URLs, allowed origins (CORS), social providers, user data storage (Xsolla / PlayFab / Firebase / custom)references/integration-modes.md — Login Widget vs Login API vs Xsolla SDKs; JWT vs OAuth 2.0 protocol; client-side vs server-side callsreferences/auth-flows.md — every authentication method: classic (username/password), passwordless (email / SMS one-time code), social (browser redirect + native silent token), device ID, server custom ID, silent cross-platform (Steam / Xbox Live / Epic Games / PSN / Meta Horizon)references/tokens-and-validation.md — user JWT vs server JWT, claims, expiration & refresh, JWKS validation, common errors, rate limits, IP allowlistreferences/user-management.md — user profile, password reset, MFA, account linking, social linking, attributes, friends, search, ban/unban, export/importUse this skill when the developer wants to:
iss, exp, xsolla_login_project_id, groups, sub)Bearer JWT to Store / cart / payment-token flows in catalog-design, Headless Checkout in headless-checkout-integration, or user.id to the handler in webhooks-impllogin-stylingOut of scope: visual styling of the Login UI (→ login-styling), catalog & purchase (→ catalog-design), Payments (→ headless-checkout-integration), webhook handler implementation (→ webhooks-impl), Xsolla account/API-key bootstrap (→ merchant-setup).
export XSOLLA_MERCHANT_ID=<your merchant ID>
export XSOLLA_PROJECT_ID=<your project ID>
export XSOLLA_PROJECT_API_KEY=<your API key>
export XSOLLA_LOGIN_PROJECT_ID=<UUID of the Login project>
export XSOLLA_LOGIN_OAUTH_CLIENT_ID=<numeric OAuth 2.0 client ID>
# server flow only — never expose to client builds
export XSOLLA_LOGIN_OAUTH_CLIENT_SECRET=<OAuth 2.0 client secret>
merchant-setup first — it sets the publisher/project variables).search_xsolla_sources — this skill links the right operations, but field-level schemas must come from live docs, not from this file. If MCP is unavailable, fetch the linked developers.xsolla.com pages.https://login.xsolla.com/api. All Login traffic is HTTPS only; HTTP is rejected.Configure the Login project in Publisher Account. Create or pick the Login project (standard for most games, shadow for cross-platform — Steam/Xbox/Epic/PSN — with a separate main account project). Pick the user data storage (Xsolla default, or PlayFab / Firebase / custom proxy). Add at least one OAuth 2.0 client: public for the Widget/SDK, confidential for backend code-exchange, server (client_credentials) for S2S calls. Set the Callback URL(s) and Allowed origins (CORS). Enable the social networks the game needs and fill in each provider's App ID + Secret (and Organization ID for org-scoped IDs on Meta Horizon). Decide on email/phone collection, password policy, MFA, custom email/SMS templates. Full checklist: references/setup-pa.md.
Pick the integration mode and protocol. Default to the Login Widget (@xsolla/login-sdk) for web — ready-made UI, fastest path. Use the Login API directly when building a custom UI or a non-web client; use an Xsolla SDK (Unity / Unreal / iOS / Android / Cocos) for engines. For protocol, prefer OAuth 2.0 (browser/mobile, refresh tokens, SSO) — fall back to JWT only when the partner has a tightly controlled environment and no need for refresh. Decision matrix and widget initialization: references/integration-modes.md.
Implement the chosen authentication method(s). Most projects ship at least one of: classic username/email + password (Register new user → Auth by username and password, plus Reset password); passwordless email or SMS (Start auth by email/phone → user enters one-time code → Complete auth by email/phone); social (browser: Get link for social auth → redirect → callback returns token; native/silent: Auth via access token of social network for mobile/headset apps that already have a provider token, e.g. Meta Horizon nonce, Steam session ticket, Epic exchange code); device ID for guest play; server custom ID for partner-issued IDs; silent cross-platform for shadow projects (Steam/Xbox/Epic/PSN session ticket → JWT). Endpoints, request shapes, and provider notes: references/auth-flows.md.
Style the Login UI — do not ship the stock appearance. Once the widget (or custom Login-API front end) is rendering the auth flow, theme it to match the game: colors, logo, typography, background, buttons, dark mode. Any player-facing Login screen must be styled — invoke the login-styling skill for the theming mechanics. This is a required part of a real integration, not an optional polish step.
Validate the user JWT on every privileged request. On every request to your backend that uses the user JWT, verify: signature against https://login.xsolla.com/api/projects/{login_project_id}/keys (JWKS), iss == https://login.xsolla.com, exp in the future, xsolla_login_project_id == <expected>. Cache JWKS with kid-aware rotation. Use sub (user UUID) as the user identifier — never email or username, both can change. Issue a server JWT with grant_type=client_credentials for S2S calls. Refresh user JWTs via grant_type=refresh_token before they expire. Full claim list, [OAuth2.0] Generate JWT, Validate user JWT, Validate Server JWT, error codes: references/tokens-and-validation.md.
Wire up user management features the product needs. After the basic flow works, layer on: profile (Get/Update user details, picture, phone, email); password reset (Reset password → confirmation email → Confirm password reset); MFA / 2FA (project-level toggle + per-user setup); social account linking (Get URL to link social network to account, Link/Delete linked network); account linking across projects (Create code for linking accounts → Link accounts by code, or Link user IDs via external ID server-side); attributes (per-user JSON for save state, preferences, partner data — client-side and server-side variants); friends, search, ban/unban, export/import. Endpoint table: references/user-management.md.
Verify end-to-end. In a sandbox project: register a test user, log in with each enabled method, decode the returned JWT, verify it against the JWKS, refresh it, hit a Store call with Authorization: Bearer <JWT> (the catalog-design fast-purchase flow exercises this), confirm the Pay Station payment-token call accepts it, and confirm the webhook delivers the same user.id (= JWT sub) so the webhooks-impl handler can grant items.
client_credentials; a server client cannot do user login. JWT-protocol endpoints (/api/login/...) and OAuth 2.0 endpoints (/api/oauth2/...) have different paths and parameter shapes — pick one per flow and stay consistent. See references/integration-modes.md./api/projects/{login_project_id}/keys), not a hard-coded key, and check iss, exp, and xsolla_login_project_id. Without these, any forged token is accepted.redirect_uri_mismatch when the URL passed to the Widget/API is not exactly listed under Callback URLs / Allowed origins (CORS) in Publisher Account. Trailing slash, scheme (http vs https), and port must match byte-for-byte.email or username instead of sub. Both can be changed by the user (or by social-account linking) — use the JWT sub (UUID) as the stable internal user ID. Email/username are convenience fields only.GetUserProof, Steam session ticket on first use) are single-use. A naive client retry on a transient 5xx burns the credential and the next attempt fails — request a fresh code/nonce per attempt and surface the right error. See references/auth-flows.md.grant_type=refresh_token (OAuth 2.0) or re-auth (JWT protocol), Store and Pay Station calls start failing 401 mid-session. Refresh proactively before exp.references/setup-pa.md.Prompt: "Integrate Xsolla Login into my web game. I want a 'Continue with Google' button, classic email + password sign-up with email confirmation, and a passwordless email one-time-code option. Validate JWTs on my Node.js backend before granting access to the Store API."
Expected (live run, sandbox): the agent reads this SKILL.md plus all five references, configures a standard Login project with an OAuth 2.0 public client + Google social provider, scaffolds Login Widget initialization in the frontend, implements the three auth flows (Google via Get link for social auth redirect; classic via Register new user → email confirmation → Auth by username and password; passwordless via Start auth by email → Complete auth by email), and adds an Express middleware that fetches /api/projects/{login_project_id}/keys, verifies signature + iss + exp + xsolla_login_project_id, and exposes req.user.sub. Sandbox smoke test: register a user → email confirmation 200 → login with each of the three methods → JWT validates → refresh succeeds → middleware rejects a tampered token with 401. ⏳ Pending live run on a fixture project.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub xsolla/xsolla-ai-kit --plugin xsolla-ai-kit15 skills in this plugin
/catalog-designSets up an Xsolla catalog: virtual items, virtual currency and its packages, bundles, game keys, item groups, regional prices and LiveOps offers, plus the client purchase flow (buy by SKU or cart, buy for virtual currency, order status). Use for "set up my Xsolla catalog", "create virtual items", "sell game keys", "regional prices"./description-to-shopTurns a game description or store listing (App Store, Google Play, Steam) into the shop brief that shop-builder-assembly builds from. Reached through nocode-shop-setup; not an entry point. Owns intake and inference only: presets, confirmation, CLI writes and preview belong to shop-builder-assembly./game-web-portalBuilds or resumes an unpublished Game Web Portal for a PC or mobile game: Home, News, Rewards, Web Shop, Community and an optional Launcher, on a site made from the Multi-page web portal template. Reached through nocode-shop-setup. Use for "continue my Game Web Portal" or "add the Community section". Never publishes; that stays with the human. Not for XLA Pages on x.la; use `xla-pages`./headless-checkout-integrationIntegrates Xsolla Headless Checkout — a fully customizable, client-controlled payment UI built on the @xsolla/pay-station-sdk JavaScript SDK, where payment data stays isolated in secure iframes and payments run through Xsolla without the standard Pay Station./login-stylingStyles the Xsolla Login widget (sign-in, sign-up, password reset): upload custom CSS through the API and attach it to the login project, or set colors, logo, background and social order through themeJSON. Use for "style the login", "brand the sign-in screen", "upload login CSS", "dark-mode login". Pairs with login-setup, which wires the auth flow./merchant-setupGuide for a merchant or developer setting up an Xsolla Account and obtaining API credentials. Use when the user needs that account, API keys, merchant-level versus project-level keys, sandbox mode, to accept payments, to start an Xsolla integration, or to test payments. The agent cannot create the account. This skill gives the exact steps the user completes manually.Other plugins' skills for the same job