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:
- Complete prerequisites.
- Complete setting up social login in Publisher Account.
- Set up a custom OAuth 2.0-client.
Prerequisites
- Open your project at Publisher Account.
- Go to the Login section.
- 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.
- Go to your authorization variant block and choose Callback URLs.
- 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.
- Click Save changes.
Set up social in Publisher Account
- Open your project at Publisher Account.
- Go to the Login section.
- Click Configure in the Login project pane.
- In the Authentication panel, click Social login.
- 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
- In the social network panel, click the ⚙ icon and choose Settings.
- Log in to the developer account of the social network.
- Add
https://login.xsolla.com/api/social/oauth2/callback
as the allowed redirect URI in your developer account. - 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.
- To connect a Custom Return URL, contact the integration team or your Customer Success Manager or email to csm@xsolla.com.
- 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.
- 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.
- To connect automatic synchronization of user profile data, switch the Synchronize user profile attributes after every login toggle to On.
- Click Connect.
Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Found a typo or other text error? Select the text and press Ctrl+Enter.