Skip to content

Identity verification service

The Hive platform provides an identity verification service to comply with Korean compliance requirements. The identity verification service consists of identity authentication, adult verification, and parental consent features, and is supported on Android, iOS, and Windows targets of the Hive SDK (hereinafter SDK) so that it can be used in both mobile and PC games. In mobile game environments, even if the game screen is displayed in landscape orientation, the identity verification service UI is provided in portrait orientation.

Identity authentication

Identity authentication is a feature that allows identity verification using a user's mobile phone number to limit in-game abusing or restrict users of specific age groups. Since the SDK can call the identity authentication API regardless of the game login timing, identity authentication can be performed before starting services such as entering the store or entering dungeons. Therefore, it can be used to allow only users who have completed identity authentication to continue with the subsequent game process.


When the SDK calls the identity authentication API and identity authentication is completed, the phone number, date of birth, and DI (Duplicated Joining Verification Information) hash value are obtained as results. At this time, the DI hash value is not related to the current login and is not linked to the PlayerID.

Example code for calling the identity authentication API is as follows:

API Reference: hive.AuthV4.showIdentityVerification

using hive;

AuthV4.showIdentityVerification((ResultAPI result, Identity identity) => {    
    if (result.isSuccess()) {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
});
#include "HiveAuthV4.h"

FHiveAuthV4::showIdentityVerification(FHiveAuthV4OnIdentityVerificationDelegate::CreateLambda([this](const FHiveResultAPI& Result, FHiveIdentity& identity) {
    if (Result.IsSuccess()) {
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
}));

API Reference: AuthV4::showIdentityVerification

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

AuthV4::showIdentityVerification([=](ResultAPI result, Identity identity) {    
    if (result.isSuccess()) {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }   
});

API Reference: AuthV4.showIdentityVerification

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

AuthV4.showIdentityVerification(object : AuthV4.AuthV4ShowIdentityVerificationListener {    
    override fun onAuthV4ShowIdentityVerification(result: ResultAPI, identity: Identity?) {    
        if (result.isSuccess) {    
            // API call successful
            // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
        } else {
            // NEED_INITIALIZE called before setup
            // CANCELED window closed before receiving authentication result
            // RESPONSE_FAIL abnormal response
            // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
        } 
    }    
})

API Reference: AuthV4.showIdentityVerification

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

AuthV4.showIdentityVerification(result, identity -> {    
    if (result.isSuccess()) {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
});

API Reference: AuthV4Interface.showIdentityVerification

import HIVEService

AuthV4Interface.showIdentityVerification() { result, identity in    
    if result.isSuccess() {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
}

API Reference: HIVEAuthV4:showIdentityVerification

#import <HIVEService/HIVEService-Swift.h>

[HIVEAuthV4 showIdentityVerification: ^(HIVEResultAPI *result, HIVEIdentity *> *identity) {    
    if ([result isSuccess]) {    
        // API call successful
        // identity.phoneCode, phoneNumber, dateOfBirth, hashedDi
    } else {
        // NEED_INITIALIZE called before setup
        // CANCELED window closed before receiving authentication result
        // RESPONSE_FAIL abnormal response
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference identity authentication library
    }
}];

Adult verification

Games classified as "not for youth use" must restrict access for minors under 19 years old. The Hive platform provides an adult verification feature that allows game access only after verifying adult status through mobile phone identity authentication. The validity period for adult verification is 1 year, after which an automatic re-authentication process occurs.

The adult verification feature can be performed during game login without implementing separate code in the SDK if adult verification is enabled in the console [Authentication > Adult Authentication > Enable Settings].

Warning

Identity authentication and adult verification can only be performed by users in South Korea who have a resident registration number or foreign registration number and possess a mobile phone under their own name.

Response when adult verification fails

When a minor attempts adult verification and fails, they receive a response of ResultAPI.CANCELED(-6) and ResultAPI.Code.AgeLimit(-1200067), "Failed due to age restriction.". Game companies can use this response to guide minor users in the game in their desired manner.

Obtaining DI hash value

After adult verification is completed, calling the AuthV4.getHashedDi method in the SDK obtains a DI hash value that can identify adult-verified users. The reason for hashing DI is for security purposes, and game companies can use this hash value as is. Since this DI hash value is linked to the PlayerID after login, the hash value can be used as an identifier for adult-verified users.

Example code for calling the AuthV4.getHashedDi method to obtain the DI hash value linked to the PlayerID is as follows:

API Reference: hive.AuthV4.getHashedDi

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

FHiveAuthV4::getHashedDi(FHiveAuthV4OnHashedDiDelegate::CreateLambda([this](const FHiveResultAPI& Result, FString& hashedDi) {
    if (Result.IsSuccess()) {
        // API call successful
    } else {
        // NEED_INITIALIZE called before setup
        // INVALID_SESSION called before signIn
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification 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 {
        // NEED_INITIALIZE called before setup
        // INVALID_SESSION called before signIn
        // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification 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 {
            // NEED_INITIALIZE called before setup
            // INVALID_SESSION called before signIn
            // DEVELOPER_ERROR, CommonLibraryMissing failed to reference adult verification library
        } 
    }    
})

API Reference: AuthV4.getHashedDi

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

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

API Reference: AuthV4Interface.getHashedDi

import HIVEService

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

API Reference: HIVEAuthV4:getHashedDi

#import <HIVEService/HIVEService-Swift.h>

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

According to the Youth Protection Act, those under 19 years old can only join and use games with parental consent. The SDK provides functionality to obtain parental consent through mobile phone identity authentication when minors join PC games. Additionally, when providing game usage details to parents, the minor's date of birth and the parent's email address are delivered to the game app.

To get parental consent information, you must call the getParentalConsentInfo() method after completing parental consent. The getParentalConsentInfo method delivers the date of birth of the user (minor) and the parent's email address that were provided during parental consent.

Example code for getting parental consent information is as follows:

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();