For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using escs OAuth for automated user sign in in your GameHub

The goal is to offer the best possible user experience. You can skip the escs registration flow and sign users in to GameHub with their existing account credentials. The integration is simple. You create an OAuth app and make one method call in your app.

Integration steps

Go to client.demo.escs.io and create a temporary game as described in Integration - step 1. You only need to create the app. No further setup is required.

Then open the game settings and press Create oAuth App, as shown below.

The following screen opens. You can keep the default app name and enter any description. Leave the Secret key field blank. It is created automatically. Do not lose this key. Store it somewhere safe! It cannot be recovered if lost. In Game API URL, enter the endpoint where the escs account system can fetch the player's profile data by using the access token you send. This endpoint must validate the access token and respond with the profile data.

Fill in the fields and press the "Create App" button.

Press Create App. You will get the following response:

Copy and save the keys! You cannot recover them later.

Save both keys shown above: the secret key and the application ID. You cannot recover them later.

Then continue with the Access token section below.

Access token

escs receives the access token from your app through the corresponding post message, as described in the GameHub integration guide. How your app gets this access token from your backend is up to you.

After that, the escs backend uses that data to request the actual user profile from your API endpoint. To get a user's profile, the escs account system sends the following POST request to Game API URL:

Here, code is the access token your app sent to escs, and secretKey is the generated key from the client dashboard. escs expects a response in the following format:

Here, email and username contain the player's data. After that, the player is signed in.

Last updated