Skip to main content

Platform login

Guest sessions can be lost when a player closes the game or their browser. To prevent this, you can prompt players to register or sign in on the Jest platform. Registered players are able to receive notifications and won’t risk losing their progress. For more details, see Notifications.

Converting guest players into registered users is one of the most important steps in the user funnel. Improvements at this stage directly translate into higher retention, more active players, and increased revenue.

There are several ways to prompt players to register or sign in, depending on what best fits your game experience. The platform can also automatically trigger prompts, though this behavior can be disabled if needed. See SDK initialization for more information.

The registration flow is completed via SMS or RCS, after which players are seamlessly redirected back into the game.

Platform registration

The platform includes a built-in registration flow that can be triggered directly from your game. It is visually consistent with the rest of the platform and is the easiest option to implement.

This is also the flow used by the platform’s automatic registration prompts.

After initializing the platform, you can trigger the registration flow at the appropriate moment. Only guest players should be prompted to register:

const player = JestSDK.getPlayer();

if (!player.registered) {
// Guest player — prompt registration
JestSDK.login();
}

Players can either dismiss the prompt or complete the registration flow. In both cases, no additional handling is required from the game.

The method will throw an error if the player is already registered or if the entry payload is invalid.

Jest signup popup

The method also supports an optional entryPayload, which is returned to the game after the player completes login:

const player = JestSDK.getPlayer();

if (!player.registered) {
JestSDK.login({
entryPayload: {
source: "after_tutorial",
},
});
}

This can be useful for tracking where the registration was initiated or restoring context after the player returns to the game. See Entry payload for more details.

JestSDK.login()

login(options?: {
entryPayload?: Record<string, unknown>;
}): Promise<void>;

Options:

NameTypeDescription
entryPayloadRecord<string, unknown>Optional. The entry payload to pass to the game on login.

Customized registration flow

In addition to the default platform popup, the SDK allows you to build a fully customized registration experience using JestSDK.showRegistrationOverlay(). This approach gives you greater control over the UI and lets you better integrate the flow into your game.

All requirements and functionality remain the same as with the platform registration flow. The key difference is that your game is responsible for rendering and managing the user interface.

The platform will still display the required legal text and provide a dismiss button. This overlay is designed to be minimal, unobtrusive, and visually neutral so it fits naturally within your game.

Once triggered, your game is responsible for handling the rest of the flow, giving you full control over the player experience:

const player = JestSDK.getPlayer();

if (!player.registered) {
const {
closeButtonAction,
loginButtonAction
} = JestSDK.showRegistrationOverlay();

// Attach these actions to your in-game UI
}

The method returns two functions:

  • closeButtonAction — closes the overlay
  • loginButtonAction — initiates the login flow

These should be wired to your in-game buttons or UI elements.

Jest custom registration overlay

The overlay with legal text and a close button.

Jest custom registration overlay

The overlay on top of a game.

In addition to entryPayload, the registration overlay supports a theme option, allowing you to match its appearance to your game. The available themes are "dark" (default) and "light".

You can also provide an optional onClose callback, which is triggered when the player dismisses the overlay. This is useful for cleaning up or closing any related game UI.

The callback is invoked both when the built-in close button is used and when closeButtonAction is called, so you don’t need to handle these cases separately:

JestSDK.showRegistrationOverlay({
theme: "light",
onClose: () => closeGamePopup(),
});

JestSDK.showRegistrationOverlay()

showRegistrationOverlay(
options?: {
theme?: "dark" | "light";
onClose?: () => void;
entryPayload?: Record<string, unknown>;
}
): {
loginButtonAction: () => void;
closeButtonAction: () => void;
};

Options:

NameTypeDescription
theme"dark" | "light"Optional. The theme of the registration overlay. Defaults to "dark".
onClose() => voidOptional. Callback function to be executed when the overlay is closed.
entryPayloadRecord<string, unknown>Optional. The entry payload to pass to the game on login.

Returns:

NameTypeDescription
loginButtonAction() => voidFunction to trigger the login flow from the game UI.
closeButtonAction() => voidFunction to close the overlay from the game UI.