Skip to content

Identity verification service

Hive SDK provides identity verification services for adult authentication and parental consent.

Adult Authentication

Games rated as "Not for Youth" must restrict access for minors under 19. Hive offers adult authentication via mobile phone verification, allowing only verified adults to access the game. The authentication is valid for one year, after which re-authentication is automatically required.

No code implementation is needed for adult authentication; simply enable the feature in the Hive Console. Once enabled, adult authentication is performed during login.

Warning

Adult authentication is only available to users who have a Korean resident registration number or foreign registration number and a mobile phone registered in their name.

Response on Adult Authentication Failure

If a minor attempts adult authentication and fails, the response will be ResultAPI.CANCELED(-6), ResultAPI.Code.AgeLimit(-1200067), and "Failed due to age restriction." You can use this response to guide minor users in your game as needed.

Obtaining DI Hash Value

After successful adult authentication, use the AuthV4.getHashedDi method to obtain a hashed DI (Duplicated Joining Verification Information) value that identifies the authenticated user. DI is hashed for security, and you can use this value directly. The DI hash is linked to the PlayerID after login, so you can use it as an identifier for authenticated users. Here is an example of obtaining the DI hash linked to PlayerID:

API Reference: hive.AuthV4.getHashedDi

using hive;    
AuthV4.getHashedDi((ResultAPI result, String hashedDi) => {    
    if (result.isSuccess()) {    
        // API call successful 
    } else {
        // Called before NEED_INITIALIZE setup
        // Called before INVALID_SESSION signIn
        // DEVELOPER_ERROR, CommonLibraryMissing: Failed to reference adult authentication library
    }
});
#include "HiveAuthV4.h"

FHiveAuthV4::getHashedDi(FHiveAuthV4OnHashedDiDelegate::CreateLambda([this](const FHiveResultAPI& Result, FString& hashedDi) {
    if (Result.IsSuccess()) {
        // API call successful
    } else {
        // Called before NEED_INITIALIZE setup
        // Called before INVALID_SESSION signIn
        // DEVELOPER_ERROR, CommonLibraryMissing: Failed to reference adult authentication library
    }
}));

API Reference: AuthV4::getHashedDi

#include <HIVE_SDK_Plugin/HIVE_CPP.h>    
using namespace std;    
using namespace hive;    
AuthV4::getHashedDi([=](ResultAPI result, string hashedDi) {    
    if (result.isSuccess()) {    
        // API call successful    
    } else {
        // Called before NEED_INITIALIZE setup
        // Called before INVALID_SESSION signIn
        // DEVELOPER_ERROR, CommonLibraryMissing: Failed to reference adult authentication library
    }   
});

API Reference: AuthV4.getHashedDi

import com.hive.AuthV4    
import com.hive.ResultAPI    

AuthV4.getHashedDi(object : AuthV4.AuthV4GetHashedDiListener {    
    override fun onAuthV4GetHashedDi(result: ResultAPI, hashedDi: String?) {    
        if (result.isSuccess) {    
            // API call successful    
        } else {
            // Called before NEED_INITIALIZE setup
            // Called before INVALID_SESSION signIn
            // DEVELOPER_ERROR, CommonLibraryMissing: Failed to reference adult authentication library
        } 
    }    
})

API Reference: AuthV4.getHashedDi

import com.hive.AuthV4;    
import com.hive.ResultAPI;    

AuthV4.getHashedDi(result, hashedDi -> {    
    if (result.isSuccess()) {    
        // API call successful    
    } else {
        // Called before NEED_INITIALIZE setup
        // Called before INVALID_SESSION signIn
        // DEVELOPER_ERROR, CommonLibraryMissing: Failed to reference adult authentication library
    }
});

API Reference: AuthV4Interface.getHashedDi

import HIVEService

AuthV4Interface.getHashedDi() { result, hashedDi in    
    if result.isSuccess() {    
        // API call successful    
    } else {
        // Called before NEED_INITIALIZE setup
        // Called before INVALID_SESSION signIn
        // DEVELOPER_ERROR, CommonLibraryMissing: Failed to reference adult authentication library
    }
}

API Reference: HIVEAuthV4:getHashedDi

#import <HIVEService/HIVEService-Swift.h>

[HIVEAuthV4 getHashedDi: ^(HIVEResultAPI *result, NSString *> *hashedDi) {    
    if ([result isSuccess]) {    
        // API call successful    
    } else {
        // Called before NEED_INITIALIZE setup
        // Called before INVALID_SESSION signIn
        // DEVELOPER_ERROR, CommonLibraryMissing: Failed to reference adult authentication library
    }
}];

Under the Youth Protection Act, users under 19 must obtain parental consent to sign up and use games. Hive SDK provides a feature to obtain parental consent for PC game sign-ups via mobile phone verification. For customer support or providing game usage details to parents, the SDK also delivers the minor's birthdate and the parent's email address to the app.

To retrieve parental consent information, call the getParentalConsentInfo() method after parental consent is completed. This method returns the minor's birthdate and the parent's email address provided during consent.

Example code to get parental consent information:

API Reference: hive.AuthV4.getParentalConsentInfo

using hive;    

    AuthV4.ParentalConsentInfo parentalConsentInfo = AuthV4.getParentalConsentInfo();    
#include "HiveAuthV4.h"

TOptional<FHiveParentalConsentInfo> ParentalConsentInfo = FHiveAuthV4::GetParentalConsentInfo();

API Reference: AuthV4::getParentalConsentInfo

#include <HIVE_SDK_Plugin/HIVE_CPP.h>    
    using namespace std;    
    using namespace hive;    

    AuthV4::ParentalConsentInfo parentalConsentInfo = AuthV4::getParentalConsentInfo();