In your application, you can implement user authentication using their account in social networks. If the user’s first login is via a social network, a new account is created automatically. The user doesn't need to enter a username, email address, or other data.
Social login is performed using web services. The application opens a form in the browser to complete authentication via the selected social network.
Social login can be your application’s primary or alternative authentication method.
If you use social login as an alternative authentication method, the social network account automatically links to an existing user account if the following conditions are met:
- A user who signed up with a username/email address and password logged into your application via a social network account.
- A social network returns an email address.
- The user’s email address in a social network matches the email address used to sign up in your application.
SDK supports the following providers for social login:
- Xbox Live
To set up authentication through web services:
- In the application interface, add buttons for authentication via social networks.
- Set up social connections for a Login project in Publisher Account.
- Implement authentication logic on the application side.
Set up social connections for Login project in Xsolla Publisher Account
- Open your project in Publisher Account.
- In the side menu, click Login.
- Click Configure in the pane of a Login project.
- On the navigation page, go to the Authentication block and select the Social login section.
- Connect social networks that users can use to sign up and log into the application:
- To connect a social network, click the ⚙ icon and select Connect.
- To connect several social networks at once, select the required panes (their borders will turn green). Then, from the Manage drop-down menu, select Connect.
- To connect all available social networks, click Select all. Then, from the Manage drop-down menu, select Connect.
Integrate on application side
Implement the following logic when clicking the social login button:
- Get the sign-up/login page URL using the
getLinkForSocialAuthmethod from the Login library.
- Open the sign-up/login page in a browser.
- Track the page URL change after successful user authentication.
- Get the authentication code from the URL of the active page.
- Exchange the authentication code for a token using the
generateJWTmethod from the Login library.
Was this article helpful?
Rate this page
Don’t want to answer
Thank you for your feedback!
Found a typo or other text error? Select the text and press Ctrl+Enter.