Authentification silencieuse via la plateforme de publication
Silent authentication allows users to log into you application without having to enter their credentials again. With this type of authentication, the Xsolla Login server uses the credentials that the user provided on the application’s publishing platform.
To implement silent authentication via the publishing platform:
- Set up the application in the platform developer account.
- Set up silent authentication in Publisher Account.
- Complete integration steps on your application’s side.
Configurer l'authentification silencieuse
In the Login product, two approaches to enabling silent authentication are implemented:
- by configuring the classic login option (see instructions below);
- by creating a shadow Login project (see How to set up a shadow Login project).
To enable silent authentication in the classic login option:
- Open your project in Publisher Account and go to the Login section.
- Click Configure in the panel of a classic login option.
- On the navigation page, go to the Authentication block and select the Publishing platforms section.
- To connect a publishing platform, click the ⚙ icon next to its name and select Settings.
- In the modal window, specify the parameters for the selected platform:
- Steam:
- Application ID — AppID of your account on the platform;
- Application secret key — Web API Key.
- Epic Games:
- Application ID — Client ID of the client of your game on the platform;
- Application secret key — Secret key of the client of your game on the platform.
- Xbox Live:
- Application ID — Application ID/Client ID of your game on the platform;
- Application secret key — Application Secret generated when your game was registered on the platform.
- Steam:
- Click Connect.
- Repeat steps 4 – 6 for other publishing platforms, if required.
Intégration côté application
- Integrate the publishing platform SDK into your application.
- Implement the logic of obtaining the session ticket:
- For Steam, get the session ticket.
- For Xbox Live, form a session ticket based on the platform data after user authentication. The parameter is formed based on the
\
template where:-\ ;\ \
— Xbox User ID\
— user hash\
— Xbox Secure Token Service
- For Epic Games, get the authorization code (
exchange code ) from the platform that is generated after user authentication and is used as a session ticket.
- Implement user authentication logic using SDK methods:
SilentAuth
— exchanges the session ticket from the publishing platform to JSON Web Token (JWT) and authenticates the user.OAuthLogout
— ends the active user session.
SteamAuth.cs
class as an example. If you use the demo project as the initial version of the authentication system, you can set up silent authentication via Steam by following the How to set up native authentication via Steam guide.Liens utiles
Dernière mise à jour: 10 Octobre 2023Faute de frappe ou autre erreur dans le texte ? Sélectionnez le texte concerné et appuyez sur Ctrl+Entée.