Login

Login is a single sign-on tool that authenticates and secures user passwords on behalf of partners who develop video games. It creates a seamless, one-click user registration experience through 30+ third-party authentication providers that offer players convenient, safe, and fast methods for signing up or logging into all of their favorite games. Login uses API methods and allows partners to:

  • Process personal data according to the GDPR regulations
  • Configure the solution from Publisher Account
  • Choose between partner- or Xsolla-side user data storage
  • Authenticate users via username/password or social networks
  • Order social networks according to their use and the user’s location

You can also authenticate users via the Login Widget, which supports:

  • UI customization
  • Localization into 20 languages
  • Automatic delivery of widget updates
  • Widget start page setup

Note: Login Widget is recommended when using Launcher. If you’re already using Xsolla products and want to integrate them with Login, please contact your Account Manager.

Integration Flow

There are two ways to integrate Login:

  • Via API, if you use your own interface to authenticate users in the game, or
  • Using the Login Widget, which features both a user authentication UI and Login API methods.

Integrating Login via API

  1. Create a Login instance in your Publisher Account and specify:
    • Name,
    • Link to the game’s website to connect Login to.
  2. Go to General settings and fill in the following fields:
    • Callback URL to redirect the user to after successful authentication,
    • Allowed origins (CORS) that will be calling the API methods,
    • Error callback URL to redirect the user to in case of an authentication error. If you don’t specify any value, we’ll be using the Callback URL.
  3. Select a user database storage (ours or yours).
  4. Set up the social networks via which users will be able to log in.

Integrating Login via a Widget

  1. Create a Login instance in your Publisher Account and specify:
    • Name,
    • Link to the game’s website to connect Login to.
  2. Go to General settings and fill in the following fields:
    • Callback URL to redirect the user to after successful authentication,
    • Error callback URL to redirect the user to in case of an authentication error. If you don’t specify any value, we’ll be using the Callback URL.
  3. Select a user database storage (ours or yours).
  4. Set up the social networks via which users will be able to log in.
  5. Customize the Login Widget UI.
  6. Connect Login Widget to your website.

UI Customization

  1. Download styles archive from your Publisher Account and unpack it.
  2. Download and install the latest LTS version of Node.js.
  3. Run npm i from the unpacked styles folder.
  4. Edit app/styles/themes/_default.scss.
  5. Run npm run styles from the unpacked styles folder.
  6. Upload the file with a name resembling app.default.css from the dist folder to your Publisher Account.

For further widget UI customization, repeat steps 4–6.

Connecting Login Widget to Your Website

To integrate Login Widget with your website, use Xsolla Login Javascript SDK.

Step 1

Connect Xsolla Login Javascript SDK:

  • If your project uses Bower, launch the console and run bower install xsolla-login-js-sdk.
  • If you don’t have the package installed, add the following code to the <head> tag of the web page where you want to place the widget: <script src=“https://cdn.xsolla.net/xsolla-login-widget/sdk/1.3.2/xl.min.js”></script>.

Step 2

Add the widget initialization code to the <body> tag.

<script type="text/javascript">
XL.init({
  projectId: '{Login projectId}',
  loginUrl: '{loginUrl}',
  locale: 'en_US',
  onlyWidgets: true,
  fields: 'email'
});
</script>

Parameter Type Description
[i18n] api_param_login_project_id string [i18n] api_param_login_project_id_desc Required.
loginUrl string [i18n] api_param_login_auth_login_url_desc
[i18n] api_param_login_locale string [i18n] api_param_login_locale_desc
onlyWidgets boolean Whether the Login Widget UI is used. ‘true’ by default.
[i18n] api_param_login_fields string [i18n] api_param_login_fields_desc
theme string URL with the widget styles file. If the value is empty, styles uploaded to Publisher Account are used.

Step 3

Add the block to contain the widget to the <body> tag. Specify the block’s ID in the element_id parameter.

<div id="xl_auth"></div>
<script type="text/javascript">
var element_id = 'xl_auth';
var options = {
  width: 400,
  height: 550,
  route: XL.ROUTES.REGISTRATION
};
XL.AuthWidget(element_id, options);
</script>

Parameter Type Description
element_id string ID of the block containing the Login Widget. Required.
options object Login Widget block settings. The object consists of the parameters listed below.
width number Block width in pixels. Default is 400.
height number Block height in pixels. Default is 550.
route string Widget start page. Can be:
  • XL.ROUTES.LOGIN — a login page via username/password. Used by default.
  • XL.ROUTES.REGISTRATION — a registration page.
  • XL.ROUTES.RECOVER_PASSWORD — a password reset page.
  • XL.ROUTES.ALL_SOCIALS — a page with a list of social networks available for user authentication.

Processing of Personal Data

Processing of personal data of the European Union (EU) users is regulated according to the provisions of the GDPR. Below you will find a list of the GDPR regulations and how Login can help you comply with them.

According to Articles 6-8 of the regulation, you must:

  • request the data subject to give consent to the processing of his or her personal data,
  • give the data subject the right to withdraw his or her consent at any time.

A registration form is used in Login Widget to request user consent to process personal data.

If a user changes his or her decision,you can cancel the processing of the personal data by sending a request to support@xsolla.com.

User Rights

According to Articles 15-17, 19 of the regulation, the user has rights to:

  • get a copy of his or her personal data,
  • ask for the rectification of inaccurate personal data concerning him or her,
  • ask for the erasure of personal data concerning him or her.

If you store user data in Xsolla storage, send the request to support@xsolla.com to get, rectify or erase it.

If you store user data in your own storage, you can manage it independently.

Processing and Storage of Personal Data

According to Article 5 of the regulation,personal data shall be:

  • collected for specified purposes and not further processed in a manner that is incompatible with those purposes;
  • processed in a manner that ensures appropriate security of the personal data, including protection against unauthorised or unlawful processing and against accidental loss, destruction or damage.

Login uses the data that can affect the user’s blocking, email sending, payment making, and other ways of applying personal data.

Storage and transfer of personal data are encrypted according to the AES-256 algorithm.

Data Portability

According to Article 20 of the regulation, the user has the right to transmit and store his or her personal data. You must provide the user with structured, commonly used and machine-readable format data.

If you store user data in Xsolla storage, send the request to support@xsolla.com to get it in CSV format.

If you store user data in your own storage, you can manage it independently.

User Data Protection

According to Article 32 of the regulation, you must provide a reliable level of data security, using:

  • data encryption,
  • data confidentiality,
  • data integrity,
  • resilient data processing systems.

There are several Login features than can help you comply with the requirements:

  • data encryption in accordance with the AES-256 algorithm,
  • checking for the correctness of the entered password,
  • checking the password for security,
  • data access restriction.

Recipes

Our Recipes will help you try out some of the advanced features of Login: