Skip to content

Getting Started

Web login allows users to log in with IdP on various websites such as communities and blockchain platforms. Refer to Supported IdPs for web login.

By using the web login API, you can implement IdP login for users on external websites (e.g., community sites operated by game developers) instead of within the app. The current web login API integrates both the previous web login v1 and v2 versions.

Warning
  • Calling the web login API by version v2 or v1 is no longer supported. To receive ongoing support, use the integrated web login API.
  • The integrated web login API does not distinguish between versions.
Note

To use the web login API, you must complete the relevant settings in the Hive console. For details, refer to Supported IdPs for web login in the console guide under Authentication > Login Settings.


Prerequisites

This section describes the prerequisites according to the operation method of web login.

There are two main ways to use web login: logging in using the game PlayerID as an identifier and logging in by generating a separate user identifier.

Web login using game PlayerID as an identifier

The operation method for web login using the game PlayerID as an identifier is as follows:

  • For websites without SDK integration, such as blockchain, the PlayerID is used as the user identifier for login.
  • When linking the IdP for the first time, the PlayerID is generated directly during web login.
  • The initial IdP linking must be performed only in the game. Otherwise, account conflicts may occur.
  • When using XPLA Games Wallet, the login screen is displayed after SMS verification.


The prerequisites for web login using the game PlayerID as an identifier are as follows:

  1. Create an AppID in Console > App Center
    To use web login, first create an AppID in the console's App Center. Refer to Register AppID.

  2. Set up login in Console > Authentication
    After creating the AppID, select the IdP to use for web login and register the authentication key in Authentication > Login Settings. Guest login is not supported for web login.
    The required settings for registering the authentication key are as follows.

    • Register sign-up option: When selecting Hive Web Login as the IdP for web login, you can set the sign-up option.
      • If Sign-up enabled is selected: Initial IdP linking is possible via web login, but account conflicts may occur.
      • If Sign-up disabled is selected: Initial IdP linking is only possible in the game.
    • Register Redirect URI: Register the destination web address to redirect to after web login is completed. Up to 5 addresses can be registered.

      Note

      Account conflicts occur when the IdP is first linked via web login and a PlayerID is generated, and then additional IdP linking is attempted in the game profile after logging in with the Hive SDK. In this case, since a PlayerID has already been created via web login, the user is prompted to select which account to use.

  3. IdP console settings
    Register the Redirect URI as the web login domain address in the IdP console you will use. This process is common regardless of the web login operation method. For details, refer to Register Redirect URI in IdP console.

Web login by generating a separate user identifier

The operation method for web login by generating a separate user identifier is as follows:

  • When linking the IdP for the first time, the user identifier is generated by the product, preventing account conflicts.
  • Since the user identifier is generated by the product, it can be used in various places and account conflicts do not occur. To link the PlayerID generated in the game, use the Server API.


The prerequisites for web login by generating a separate user identifier are as follows:

  1. Create an AppID in App Center
    To use web login, create an AppID in App Center. Refer to the App Center Register AppID console guide.

  2. Set up login in Console > Authentication
    After creating the AppID, select the IdP to support web login and register the authentication key in Authentication > Login Settings. Guest login is not supported for web login.

    • Register sign-up option: When selecting Hive Web Login as the IdP for web login, you can set the sign-up option.

      • If Sign-up enabled is selected: Initial IdP linking is possible via web login.
      • If Sign-up disabled is selected: Initial IdP linking is only possible in the game.
    • Register Redirect URI: Register the destination web address to redirect to after web login is completed. Up to 5 addresses can be registered.

  3. IdP console settings
    Register the Redirect URI as the web login domain address in the IdP console you will use. This process is common regardless of the web login operation method. For details, refer to Register Redirect URI in IdP console.

Register Redirect URI in IdP console

After selecting the web login type and registering the authentication key in Authentication > Login Settings, you must register the Redirect URI as the web login domain address directly in the IdP console, such as Google or Apple.

Google

Go to Google Cloud Console, create an OAuth client ID in your project, and register the Redirect URI. For details, refer to the Google Developers documentation.

Warning

If withhive.com is automatically registered as an approved domain in the OAuth consent screen of Google Cloud Console, do not add sensitive or restricted scopes. Hive does not provide domain ownership for withhive.com.

Facebook

Go to Meta for Developers, add Facebook login settings in your app, and register the Redirect URI. For details, refer to the Meta Developers documentation.

Apple

Go to Apple Developer Console, create Services IDs, and register Return URLs in the Sign in with Apple settings. For details, refer to the Apple Developer documentation.


How to use the web login API

After completing the prerequisites above, you can implement web login by calling the following APIs:


The usage of the web login API varies depending on the purpose of the 'Web Login AppID'.

When the purpose of 'Web Login AppID' is 'Community' or 'Website'

If you select the purpose of 'Web Login AppID' as Community or Website in the Hive console's App Center > AppID Management > Register Web Login AppID, game developers will use the Web Login API as follows.

  1. Call the login page
  2. Use the response values of the User Verification and User Information Retrieval API, specifically the IdP identifiers (idp_index, idp_user_id), as user account identifiers and store them in the developer's database

The reason for using it as above is that if you log in to the IdP first on a community or website rather than in the game, a PlayerID, which is the user identifier used in the game, will not be generated. By using the IdP identifier as the user account identifier instead of the PlayerID, you can prevent account conflicts.

However, when the user accesses the game app and logs in, a PlayerID, which is the game user identifier, is generated. Therefore, it can be used as the user account identifier, distinguishing it from the PlayerID in the response value of the Verify and User Information Retrieval API's user_info or the PlayerID in the response value of the User Information Retrieval by Authentication API API.

Note

Account conflicts occur in situations like the following.

  1. Log in with web login to create the initial IdP and PlayerID
  2. After logging in to the game using the Hive SDK, connect additional IdP integration in the game profile
  3. An account conflict occurs because a PlayerID has already been created with web login, prompting the user to select an account

The purpose of using 'Web Login AppID' is for 'Blockchain'

In the Hive console, when selecting 'Blockchain' as the purpose of the 'Web Login AppID' in App Center > AppID Management > Web Login AppID Registration, game developers use the Web Login API as follows.

  1. Login Page API call
  2. Login Verification and User Information Retrieval API call and the response value PlayerID allows for user account identification (there is no need to obtain and manage a separate identifier like an IdP identifier)

In the case of blockchain, calling the login page API and the login verification and user information retrieval API will generate a PlayerID, so there is no need to use a separate IdP identifier like a community or website.