This guide demonstrates how to set up a simple one-time password (OTP) login for your players, and explains how the OTP authentication flow works.

Set up OTP login

To enable OTP login for your players:
  1. Create a deeplink webhook that follows the Password-less Deeplink Webhook format.
  2. Open the Publisher Dashboard and go to Settings.
  3. Click the Authentication tab and scroll to the OTP section.
  4. Toggle on OTP.
  5. In the OTP Generation Deeplink Url field, enter the webhook URL you created.
  6. Use the Desktop Text Model dropdown to choose how many digits your player code will have (4 or 6).

OTP authentication flow

The following flow describes how the OTP authentication process works:
  1. A player opens your web store and selects the OTP login method.
  2. Appcharge sends a request to your Password-less Deeplink Webhook with:
    • 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:
    • 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 to https://your-web-store/login?proofKey=<value>&token=<value>, where:
      • proofKey: The player code.
      • token: The access token.
      Note: 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 Player Authentication Webhook for validation.
  8. If the credentials are valid, your server responds with the player’s details. Appcharge successfully logs the player in, completing the flow.