Set up user authentication
Authentication allows users to buy items in the Web Shop and see unique offers in the catalog.
Key features of the Web Shop with authentication:
- Multiple authorization methods in the Web Shop.
- Set up personalized storefronts and promo codes for authorized users.
- Compliance with regional laws and regulations for the protection and processing of personal data.
- Rate limit and DDoS protection.
You can choose one of the following authentication methods:
- User ID authentication:
- Simplifies the integration of the Web Shop with the game.
- The authentication widget does not require registration or password entry. A user simply needs to enter the user ID from the game or use the same social network account for login as for logging in to the game.
- User ID and deep link authentication:
- Deep links can be used as an additional authentication method when logging in via User ID.
- The User ID and deep link authentication widget does not require registration or password entry. The user simply needs to enter their User ID from the game or log in via the game using a deep link.
- Deep link authentication:
- When a deep link is used as the primary login method, it allows saving payment details, which is not possible with user ID authentication.
- Authentication via Xsolla Login:
- Provides a wide range of authorization methods: social networks, one-time codes or links, and login and password.
- Allows you to customize the Xsolla Login widget.
- You can impose age restrictions on authorization.
User flow
- The user goes to Web Shop with user ID authentication configured.
- The user authorizes in the Web Shop in one of the following ways:
- The user enters their ID in the Fast Login block and clicks the login button.
- The user clicks the buy button for the selected item or the login button on the top bar:
- A modal window for entering the user ID or logging in through a social network opens.
- User enters their ID and clicks Continue or clicks on the social networks icon to choose a social network and completes authentication on the social network page.
- The system checks if a user exists in the game. If a user with this ID or social account exists in the game, the user is authorized in the Web Shop. Otherwise an error message is displayed.
How to get it
- On your application’s side, implement handling of the user validation webhook.
When receiving a webhook, the application should do the following:
- Search for a user by their ID passed in the webhook.
- Depending on the result, send one of the following status codes:
- 200 HTTP-code with an answer from webhook if a user is found
- 404 HTTP-code if the user ID is not found
- Send user attributes for personalization.
- Open your project in Publisher Account.
- In the side bar click Site Builder.
- Click Open Site Builder.
- Go to the Login Settings block.
- Select the User ID option.
- In the drop-down list, select New Login.
- Enter the URL to receive webhooks.
https://
. Using http://
will cause an error.- Set up authorization via social networks already connected to your application (optional):
- Open your project in Publisher Account and go to the Login section.
- Click Configure in the site bar.
- Go to the Authentication block and select Social login.
- To set up a social network, go to the social network card, click the ⚙ icon to the right of the title, and select Connect.
Set up Fast Login block
The Fast Login block provides users with an additional way to authenticate on the site.
The appearance of the block and its features depend on the selected authentication method.
If authentication via user ID is configured for the site, the Fast Login block displays a field for entering the ID and a login button.
Features:
- User authentication without additional transition to the modal window.
- Setting up the content of the block. You can enable and configure the following sections:
- Title
- Description
- Instructions on how to find the user ID
- Custom background
You can also expand the features of the block, for example, add text, a button, or an image, using JS code.

If authentication via Xsolla Login is configured for the site, an additional button calling for authorization is displayed in the Fast Login block. When you click on the button in the block, a modal window opens for authorization using one of the Xsolla Login methods.
Features:
- Setting up the text of the button calling for authorization
- Setting up a custom background
You can also expand the features of the block, for example, add text, a button, or an image, using JS code.
For new sites, the Fast Login block is added to Web Shop template by default, and you can remove it if necessary.
If you created a site earlier and it doesn’t have a Fast Login block, you can add it.
To add a Fast Login block:
- Open the project in Publisher Account.
- In the side menu, click Site Builder.
- In the Sites section, select your site and click Open Site Builder.
- Click Add block.
- Choose Fast Login block.
To use the Fast Login block, an authorization option should be chosen in advance from the drop-down list in the Login settings section.
For the user ID authentication method in the Login settings section, you also need to specify the URL to receive the webhook. If you don’t specify it, the site can’t be published because user authentication will be unavailable.
User authentication during site preview is possible without adding a webhook URL.
Next steps
Useful links
Found a typo or other text error? Select the text and press Ctrl+Enter.