Game Redirect Login flow
The following flow describes how the Game Redirect Login process works:- A player opens your web store and chooses to log in with your game.
-
Appcharge sends a request to your Initiate Game Auth Callback with the following properties to initiate an authentication session in your game:
- The player’s device type (mobile or desktop).
- The current date.
-
Your server responds with:
- A deeplink to redirect the player to your game.
- An access token.
Appcharge redirects the player to the deeplink you provide without modification. If you’d like to pass any additional query params beyond those needed for authentication, include them in your deeplink. -
Appcharge saves this access token and redirects the player to your game for authentication:
- Mobile device: The player is automatically redirected using the deeplink returned in the previous step.
- Desktop: Appcharge displays a QR code of the deeplink returned in the previous step, and the player uses their phone to scan it and open the game.
- Your game identifies the player via this deeplink and generates a unique 4- or 6-digit player code.
-
The player returns to the web store:
-
Mobile device: Your game redirects the player back to the web store via a URL containing the player code and the same access token issued in step 3.
For example:
proofKey: The player code.token: The same access token issued in step 3.
The access token is passed again in case the player uses a different browser. - Desktop: Your game displays the player code and instructs the player to return to the web store and enter it manually.
-
Mobile device: Your game redirects the player back to the web store via a URL containing the player code and the same access token issued in step 3.
For example:
- Appcharge sends the player code and access token to your Authenticate Player Callback for validation.
- If the credentials are valid, your server responds with the player’s details. Appcharge then successfully logs the player in and completes the flow.
