Social login

Authentication via social networks allows users to register and log in to a game through social networks that you set up in your project.

How to get it

To set up social login:

  1. Complete prerequisites.
  2. Complete setting up social login in Publisher Account.
  3. Set up a custom OAuth 2.0-client.

Prerequisites

  1. Open your project at Publisher Account.
  2. Go to the Login section.
  3. In the panel of a Login project:
    • Click Configure if you want to change an existing authorization option.
    • Set up a login project if you do not have authorization configured.
  4. Go to your authorization variant block and choose Callback URLs.
  1. Set the following parameters:
    • Callback URL — the URL or path in the application to which users are redirected after they have successfully authenticated, confirmed their email, or reset their password. You can specify multiple valid URLs.
    • Error callback URL — the URL or path in the application to which users are redirected in case of an authentication error. If no value is specified, the Callback URL value will be used.
  2. Click Save changes.

Set up social in Publisher Account

  1. Open your project at Publisher Account.
  2. Go to the Login section.
  3. Click Configure in the Login project pane.
  4. In the Authentication panel, click Social login.
  5. You can now connect authorization:
    • For one social network, click the icon and select Connect.
    • Several social networks, select different panes – their borders will turn green. Then, select Connect from the Manage drop-down menu.
    • For all social networks, click Select all. Then, select Connect from the Manage drop-down menu.

Set up custom OAuth 2.0-client

  1. In the social network panel, click the icon and choose Settings.
  2. Log in to the developer account of the social network.
  3. Add https://login.xsolla.com/api/social/oauth2/callback as the allowed redirect URI in your developer account.
  4. Go to Publisher Account. If a social network setting requests Application ID and Application secret key, copy it from your developer account and paste it in the corresponding fields in the settings of the social network panel in Publisher Account.
  5. To connect a Custom Return URL, contact the integration team or your Customer Success Manager or email to csm@xsolla.com.
  6. Check the user profile data you want to receive from the social network.
Note
Most social networks have their own data list that you can receive.
  1. Check the permissions to access data that you need to request from the social network.
Note
Most social networks have their own list of data access permissions that you can request. To receive specific data, the social network may require access negotiation in your developer account. Refer to the documentation in your developer account before activating each permission.
  1. To connect automatic synchronization of user profile data, switch the Synchronize user profile attributes after every login toggle to On.
  2. Click Connect.
Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: October 10, 2023

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!