You can check user’s profiles and suspended status after users signed in.

Getting User Profile

When user signs in Hive, you can get the user profile data by calling getProfile() method of AuthV4 class. Profile data contains playerId, playerName for display name, and playerImageUrl for user thumbnail image.

Followings are sample codes to receive profile data.

Unity®

API Reference: hive.AuthV4.getProfile

C++

API Reference: AuthV4::getProfile

Kotlin

API Reference: AuthV4.getProfile

Java

API Reference: com.hive.AuthV4.getProfile

Swift

API Reference: AuthV4Interface.getProfile

Objective-C

API Reference: HIVEAuthV4:getProfile

Checking Blacklist

When user signs in or syncs with IdP, Hive automatically checks the blacklist and suspends the user from playing game. If you need to check the status of user suspension during the game, use the checkBlacklist() method to check the suspended status of the user in real time and restrict the game play. Depending on the value of the isShow parameter at the time of checkBlacklist() call, Hive will either show the suspended status popup directly or return popup content for customizing the suspended status popup.

  • Useing Hive-providing suspension popups: Set isShow parameter as true.
  • Using Customized suspension popups: Set isShow parameter as false. For more information about popup data, see suspension popup Data Returned by Hive below.
  • Example screen of suspension popup

Suspension Popup Data Returned by Hive

If the result of calling checkBlacklist() method is success, Hive returns the values in the following table through AuthV4MaintenanceInfo object.

Field Name Description Type
title Popup title String
message Popup contents String
button Text on the label of popup button String
action Action type when a user taps the popup button

  • OPEN_URL: Execute URL passed by external browser
  • EXIT: End the app
  • DONE: Just close maintenance popup
Enumeration type of AuthV4MaintenanceActionType
url URL displayed by external browser. This is valid when the value of action field is OPEN_URL String
remainingTime Remaining time until maintenance completion (Unit: second). Time refreshes in real time and when it becomes zero, app is terminated. Integer

Followings are sample codes to check the users under suspension.

  • In case of using no Hive SDK UI (isShow = false)
    Unity®

    API Reference: hive.AuthV4.checkBlacklist

    C++

    API Reference: AuthV4::checkBlacklist

    Kotlin

    API Reference: AuthV4.checkBlacklist

    Java

    API Reference: com.hive.AuthV4.checkBlacklist

    Swift

    API Reference: AuthV4Interface.checkBlacklist

    Objective-C

    API Reference: HIVEAuthV4:checkBlacklist

  • In case of using Hive SDK UI (isShow = true)
    Unity®

    API Reference: hive.AuthV4.checkBlacklist

    C++

    API Reference: AuthV4::checkBlacklist

    Kotlin

    API Reference: com.hive.AuthV4.checkBlacklist

    Java

    API Reference: com.hive.AuthV4.checkBlacklist

    Swift

    API Reference: HIVEAuthV4:checkBlacklist

    Obj-C

    API Reference: HIVEAuthV4:checkBlacklist

Use the email address of users

After calling the Explicit Login API, you can get the email address of a logged-in user via referencing providerInfoData in PlayerInfo class instance, which is returned in the callback.

Use ProviderType as the key in providerInfoData to get the ProviderInfo. For more details, see the example codes below.

Unity®

API Reference: hive.AuthV4.showSignIn

C++

API Reference: AuthV4::showSignIn

Kotlin

API Reference: com.hive.AuthV4.showSignIn

Java

API Reference: com.hive.AuthV4.showSignIn

Swift

API Reference: HIVEAuthV4:showSignIn

Obj-C

API Reference: HIVEAuthV4:showSignIn