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 API 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.
  4. Appcharge saves the access token and redirects the player to your game for authentication:
    • Mobile device: The player is automatically redirected using the deeplink.
    • Desktop: Appcharge displays a QR code of the deeplink, and the player uses their phone to scan it and open the game.
  5. Your game identifies the player via the 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 access token. For example:
      https://your-web-store/login?proofKey=<value>&token=<value>
      
      • proofKey: The player code.
      • token: The access token.
      The access token is passed again in case the player is using 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 API 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.