Home

Custom Auth Page Setup

Learn how to setup an Optional Authentication & Registration Page

Openfort provides a customizable, ready-to-use solution designed for player authentication, registration, and wallet integration. This feature can be seamlessly integrated into your website via embedding or through a redirect process.

This tool is developed to streamline your authentication and onboarding processes for players. It is entirely optional and offered for your convenience.

Explore an unbranded version of our authentication page here.

oauth ecosystem

Configuration & Setup#

Your authentication page can be configured for various scenarios including player login, registration, and external wallet linkage.

The default setting for using Openfort's configurable authentication page is through the URL: https://connect.openfort.xyz. We also facilitate login procedures through your game's custom domain or subdomain.

Configurations are applied by adding query parameters to the base authentication page URL of https://connect.openfort.xyz. For instance, a properly configured authentication page URL is: https://connect.openfort.xyz/?publishableKey=pk_test_505bc088-905e-5a43-b60b-4c37ed1f887a

Below is the list of configurable query parameters with their descriptions.

Query ParameterExplanationValid Values
publishableKey (required)Identifies which game the authentication page should handle for login, registration, or wallet connections.Any valid game ID, e.g., pk_test_...
flowSpecifies the authentication process to guide your users through, such as login, registration, or wallet connection.login, register, connect, registerConnect
chainIdentifies the blockchain for connecting an external wallet, relevant only for connect or registerConnect flows.Supported chains
redirectUriDesignates a redirect URI for your game. Setting this redirects players to the URI after completing the flow.A valid redirect URI for your game, e.g., https://mywebsite.com

Custom Domain Configuration#

If you prefer to manage player logins via a custom domain or subdomain instead of https://connect.openfort.xyz, please contact our team on Discord for setup assistance.

Example Integration Scenarios#

Depending on your game's requirements, you can choose from various integration methods for your authentication page.

Redirect Method#

This method is typical for web-based games or interfaces where players are redirected to a page on your game's website, like a settings page.

By setting the redirectUri, you can link your game's "Register" or "Login" buttons to the Openfort authentication flow page. After logging in or registering, players will be redirected to the specified redirectUri with their authentication details in the URL fragment.

Embed Method#

This approach is suitable for mobile apps, native games, or other non-web platforms.

For example, you may choose to build a mobile app or desktop game and use our auth page for login, registration or connection of your player's external wallets.

This allows you to do an in-app or in-game web browser/modal window that opens your Openfort auth page. Your player would complete the specified flow (login, registration or wallet connection) and once finished the player's accessToken, refreshToken and id will be set and update the auth page's URL. An example final page URL after a player completes the flow may look like https://connect.openfort.xyz/?publishableKey=pk_test_505bc088-905e-5a43-b60b-4c37ed1f887a#accessToken=PLAYER_ACCESS_TOKEN&refreshToken=PLAYER_REFRESH_KEY&id=PLAYER_ID

You can use a url change listener for your in-app or in-game browser modal and wait for the #accessToken=, refresh= &id= fragment properties to be set on the url.

External Wallet Connection Method#

This method enables players to link their external wallets to your game for seamless transactions and interactions within your game environment.

This can be implemented by adding a "Connect Wallet" button on the player's settings page, redirecting them to the authentication page with the appropriate flow set. This approach ensures players can securely connect their wallets as part of the registration or login process.