Social login
Social login can be your application’s primary or alternative authentication method.
If the user’s first login is via a social network, a new account is created automatically.
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.
- User email address in a social network is the same as the email address used for sign-up in your application.
SDK supports the following providers for social login:
- Amazon
- Apple
- Baidu
- Battle.net
- Discord
- GitHub
- Kakao
- MSN
- Mail.ru
- Microsoft
- Naver
- Odnoklassniki
- PayPal
- Steam
- Twitch.tv
- VK
- Vimeo
- Xbox Live
- Yahoo
- Yandex
- YouTube
For mobile applications, the SDK also supports social login on the user’s device via a social network client (native authentication via social networks). Currently, SDK supports the following providers for native authentication:
How-tos
Native authentication allows players to log in to your application via installed applications that use social network accounts. Currently, SDK has implemented native authentication via the following social networks:
To configure native authentication:
- For native authentication via Facebook, create your Facebook developer account and a new application.
- Set up the application page in your Facebook developer account.
- For native authentication via Google, set up the project in Google API Console.
- Set up social connections for the Login project in Publisher Account.
- Set up the plug-in for your Unreal Engine project.
Set up application page in your Facebook developer account
- Go to project settings in the Facebook developer account.
- Go to Settings > Basic.
- Click Add Platform and select Android.
- Specify the package name of your Android application in the Google Play Package Name field.
- Specify a fully qualified class name of the Activity in the Class Name field (default value is
com.epicgames.ue4.GameActivity
). - Generate a hash key and specify it in the Key Hashes field.
- Click Save Changes.
For further native authentication configuration, you will need App ID and App Secret found in project settings in Settings > Basic section.
Set up project in Google API Console
- Go to Google API Console.
- Click New Project.
- Specify Project name and Location and click Save.
- Go to the created project and click OAuth consent screen in the side menu.
- Select External option and click Create.
- Specify the necessary parameters and click Save.
- Click Credentials in the side menu.
- Create an OAuth 2.0 client for your Android app:
- Click Create credentials and select OAuth client ID.
- Specify Android in the Application type field.
- Specify Name.
- Specify package name of your Android application in the Package name field.
- Get the SHA-key.
- Specify SHA-key generated in the previous step SHA-key in the SHA-1 certificate fingerprint field.
- Click Create.
- Click OK.
- Create an OAuth 2.0 client for the web application:
- Click Create credentials and select OAuth client ID.
- Specify Web application in the Application type field.
- Specify Name.
- Click Add URI in the Authorized redirect URIs section and specify
https://login.xsolla.com/api/social/oauth2/callback
URI. - Click Create.
- Click OK.
For further native authentication configuration, you will need Client ID and Client Secret found in settings of the Client ID for the web application.
Set up social connections for Login project in Xsolla Publisher Account
- Open your project in Publisher Account.
- Click Login in the side menu and go to Login projects > your Login project > Social connections.
- To set up authentication via Facebook:
- Click Edit in the Facebook panel and change status to Disconnected.
- Specify the App ID from the Facebook developer account in the Application ID field.
- Specify App Secret from the Facebook developer account in the Application Secret field.
- Click Connect.
- To set up authentication via Google:
- Click Edit in the Google panel and change status to Disconnected.
- Specify the Client ID for a web application from the Google API Console in the Application ID field.
- Specify the Client Secret for a web application from the Google API Console in the Application Secret field.
- Click Connect.
Set up plugin for Unreal Engine project
- Go to your Unreal Engine project.
- Go to
Settings > Project Settings > Plugins > Xsolla Settings > Android . - Check the
Allow Native Auth box. - Specify App ID from the Facebook developer in the
Facebook App Id field. - Specify the Client ID for a web application from the Google API Console in the
Google App Id field.
Was this article helpful?
Useful links
Last updated: August 1, 2022Found a typo or other text error? Select the text and press Ctrl+Enter.