Skip to main content
Implement Game Redirect Login to direct the player from the web store login page to the game for authentication. Once verified, the player is redirected back to the web store with a player code. This allows the game to handle secure login while giving players access to the store without separate credentials. To enable this authentication method, follow the instructions to set up Game Redirect Login.

Game Redirect Login flow

The following flow describes how the Game Redirect Login process works:
  1. A player opens your web store and chooses to log in with your game.
  2. 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.
  3. 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.
  4. 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.
  5. Your game identifies the player via this deeplink and generates a unique 4- or 6-digit player code.
  6. 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:
      https://your-web-store/login?proofKey=<value>&token=<value>
      
      • 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.
  7. Appcharge sends the player code and access token to your Authenticate Player Callback for validation.
  8. If the credentials are valid, your server responds with the player’s details. Appcharge then successfully logs the player in and completes the flow.