Result API AuthV4 Helper
Book Mark
| syncAccount | signIn | signOut | connect | disconnect |
|---|---|---|---|---|
| showLeaderboard | showAchievements | showConflict | showConflict Info | switchAccount |
| resolveConflict | getIDPList | showGameCenterLoginCancelDialog |
AuthV4 helper application flow¶
AuthV4.Helper.syncAccount¶
#if UNITY_ANDROID // Preprocessing varies by platform
AuthV4.ProviderType providerType = AuthV4.ProviderType.GOOGLE
#elif UNITY_IPHONE // Preprocessing varies by platform
AuthV4.ProviderType providerType = AuthV4.ProviderType.APPLE
#endif
AuthV4.Helper.syncAccount(providerType, (ResultAPI result, AuthV4.PlayerInfo playerInfo) =>{
switch(result.code) {
case ResultAPI.Code.AuthV4AppleLoginCancel:
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to show the Game Center cancellation message.
break;
case ResultAPI.Code.AuthV4ConflictPlayer:
// Display the account conflict UI so the conflict can be resolved.
break;
...
/*
The same ResultAPI code as the function below is also delivered.
- AuthV4.checkProvider
- AuthV4.selectConflict
- AuthV4.resolveConflict
*/
}
});
#if __IOS__ // Preprocessing varies by platform.
ProviderType providerType = ProviderType::APPLE;
#elif __ANDROID__ // Preprocessing varies by platform.
ProviderType providerType = ProviderType::GOOGLE;
#endif
AuthV4::Helper::syncAccount(providerType, [](ResultAPI const & result, std::shared_ptr<PlayerInfo> playerInfo){
switch(result.code) {
case ResultAPI::Code::AuthV4AppleLoginCancel:
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to show the Game Center cancellation message.
break;
case ResultAPI::Code::AuthV4ConflictPlayer:
// Display the account conflict UI so the conflict can be resolved.
break;
...
/*
The same ResultAPI code as the function below is also delivered.
- AuthV4.checkProvider
- AuthV4.selectConflict
- AuthV4.resolveConflict
*/
}
});
AuthV4.ProviderType providerType = AuthV4.ProviderType.GOOGLE;
AuthV4.Helper.syncAccount(providerType, new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
case AuthV4AppleLoginCancel:
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to show the Game Center cancellation message.
break;
case AuthV4ConflictPlayer:
// Display the account conflict UI so the conflict can be resolved.
break;
...
/*
The same ResultAPI code as the function below is also delivered.
- AuthV4.checkProvider
- AuthV4.selectConflict
- AuthV4.resolveConflict
*/
}
}
});
HIVEProviderType providerType = kHIVEProviderTypeAPPLE;
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
[helper syncAccount:providerType handler:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo){
switch (result.code) {
case kAuthV4AppleLoginCancel:
// Call the AuthV4.helper.showGameCenterLoginCancelDialog API to show the Game Center cancellation message.
break;
case kAuthV4ConflictPlayer:
// Display the account conflict UI so the conflict can be resolved.
break;
default:
break;
/*
The same ResultAPI code as the function below is also delivered.
- AuthV4.checkProvider
- AuthV4.selectConflict
- AuthV4.resolveConflict
*/
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4AppleLoginCancel | Game Center login was canceled. | Call the AuthV4.helper.showGameCenterLoginCancelDialog API to show the Game Center cancellation message. |
| (Required implementation) AuthV4ConflictPlayer | [When using custom UI] An account conflict occurred. | Display the account conflict UI so the conflict can be resolved. |
| AuthV4NotInitialized | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| AuthV4SigninFirst | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| AuthV4NotSupportedProviderType | This Provider is not supported by HIVE. | Try again with a provider supported by HIVE. |
| Delivers the same response value as the AuthV4.checkProvider API response. | An error occurred while signing in to the Provider to check for an account conflict. | Check the AuthV4.checkProvider ResultAPI code. |
| Delivers the same response value as the AuthV4.resolveConflict API response. | [When not using custom UI] An error occurred while attempting to switch accounts after an account conflict occurred. | Check the AuthV4.resolveConflict ResultAPI code. |
| Delivers the same response value as the AuthV4.selectConflict API response. | [When not using custom UI] An error occurred while attempting to switch accounts after an account conflict occurred. | Check the AuthV4.selectConflict ResultAPI code. |
AuthV4.Helper.signIn¶
AuthV4.Helper.signIn((ResultAPI result, AuthV4.PlayerInfo playerInfo) => {
switch(result.code) {
case ResultAPI.Code.AuthV4ConflictPlayer:
// Display the account conflict UI so the conflict can be resolved.
break;
case ResultAPI.Code.AuthV4HelperImplifiedLoginFail:
// Display the explicit login UI to proceed with login.
break;
...
// The AuthV4.showSignIn ResultAPI code may also be delivered.
}
});
AuthV4::Helper::signIn([](ResultAPI const & result, std::shared_ptr<PlayerInfo> playerInfo){
switch(result.code) {
case ResultAPI::Code::AuthV4ConflictPlayer:
// Display the account conflict UI so the conflict can be resolved.
break;
case ResultAPI::Code::AuthV4HelperImplifiedLoginFail:
// Display the explicit login UI to proceed with login.
break;
...
// The AuthV4.showSignIn ResultAPI code may also be delivered.
}
});
AuthV4.Helper.signIn(new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
case AuthV4ConflictPlayer:
// Display the account conflict UI so the conflict can be resolved.
break;
case AuthV4HelperImplifiedLoginFail:
// Display the explicit login UI to proceed with login.
break;
...
// The AuthV4.showSignIn ResultAPI code may also be delivered.
}
}
});
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
[helper signIn:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {
switch (result.code) {
case kAuthV4ConflictPlayer:
// Display the account conflict UI so the conflict can be resolved.
break;
case kAuthV4HelperImplifiedLoginFail:
// Display the explicit login UI to proceed with login.
break;
default:
break;
// Additional ResultAPI code for AuthV4.showSignIn may be provided.
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4ConflictPlayer | [When using custom UI] An account conflict occurred. | Display the account conflict UI so the conflict can be resolved. |
| (Required implementation) AuthV4HelperImplifiedLoginFail | [When using custom UI] Explicit login UI must be displayed. | Display the explicit login UI to proceed with login. |
| AuthV4NotInitialized | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| AuthV4AlreadyAuthorized | There is an existing sign-in history. | To sign in with the previously signed-in account, call the signIn API with providerType set to Auto. |
| AuthV4InProgressSignIn | SignIn is already in progress. | If the AuthV4.Helper.signIn API is already running, duplicate API calls are not allowed. End the previous feature before calling it. |
| Delivers the same response value as the AuthV4.showSignIn API response. | [When not using custom UI] An error occurred while attempting login after displaying the explicit login UI. | Check the AuthV4.showSignIn ResultAPI code. |
AuthV4.Helper.signOut¶
| Code | Message | How to solve |
|---|---|---|
| Delivers the same response value as the AuthV4.signOut API response. | An error occurred during sign-out. | Check the AuthV4.signOut ResultAPI code. |
AuthV4.Helper.connect¶
AuthV4.ProviderType providerType = AuthV4.ProviderType.HIVE; // Pass the provider to connect.
AuthV4.Helper.connect (providerType, (ResultAPI result, AuthV4.PlayerInfo playerInfo) =>{
switch(result.code) {
case ResultAPI.Code.AuthV4AppleLoginCancel
// Notify the user that account linking failed.
break;
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.connect
- AuthV4.helper.showConflict
- AuthV4.helper.switchAccount
*/
}
});
ProviderType providerType = ProviderType::HIVE; // Pass the provider to connect.
AuthV4::Helper::connect(providerType, [](ResultAPI const & result, std::shared_ptr<PlayerInfo> playerInfo){
switch(result.code) {
case ResultAPI::Code::AuthV4AppleLoginCancel
// Notify the user that account linking failed.
break;
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.connect
- AuthV4.helper.showConflict
- AuthV4.helper.switchAccount
*/
}
});
AuthV4.Helper.connect(providerType, new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
case ResultAPI.Code.AuthV4AppleLoginCancel
// Notify the user that account linking failed.
break;
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.connect
- AuthV4.helper.showConflict
- AuthV4.helper.switchAccount
*/
}
}
});
HIVEProviderType providerType = kHIVEProviderTypeHIVE; // Pass the provider to connect.
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
[helper connect:providerType handler:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {
switch (result.code) {
case kAuthV4AppleLoginCancel:
// Notify the user that account linking failed.
break;
default:
break;
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.connect
- AuthV4.helper.showConflict
- AuthV4.helper.switchAccount
*/
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4AppleLoginCancel | [When not using custom UI] The user has already canceled GameCenter login. | Notify the user that account linking failed. |
| AuthV4InProgressSignIn | Account linking is already in progress. | If the AuthV4.Helper.connect API is already running, duplicate API calls are not allowed. End the previous feature before calling it. |
| AuthV4InProgressConnect | Account linking is already in progress. | If the AuthV4.Helper.connect API is already running, duplicate API calls are not allowed. End the previous feature before calling it. |
| Delivers the same response value as the AuthV4.connect API response. | [When using custom UI] An error occurred while linking the account. | Check the AuthV4.connect ResultAPI code. |
| Delivers the same response value as the AuthV4.helper.showConflict API response. | [When not using custom UI] An error occurred while handling an account conflict after account linking. | Check the AuthV4.helper.showConflict ResultAPI code. |
| Delivers the same response value as the AuthV4.helper.switchAccount API response. | [When not using custom UI] An error occurred while switching to the conflicting account after account linking. | Check the AuthV4.helper.switchAccount ResultAPI code. |
AuthV4.Helper.disconnect¶
AuthV4.ProviderType providerType = AuthV4.ProviderType.HIVE; // Pass the provider to disconnect.
AuthV4.Helper.disconnect(providerType, new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
// The AuthV4.disconnect ResultAPI code is delivered.
}
}
});
HIVEProviderType providerType = kHIVEProviderTypeHIVE; // Pass the provider to disconnect.
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
[helper disconnect:providerType handler:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {
switch (result.code) {
// AuthV4.disconnect and ResultAPI code are passed.
}
}];
| Code | Message | How to solve |
|---|---|---|
| Delivers the same response value as the AuthV4.disconnect API response. | An error occurred while unlinking the account. | Check the AuthV4.disconnect ResultAPI code. |
AuthV4.Helper.showLeaderboard¶
AuthV4::Helper::showLeaderboard([](ResultAPI const & result, std::shared_ptr<PlayerInfo> playerInfo){
switch(result.code) {
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.helper.syncAccount
- AuthV4.helper.connect
- providerGoogle.showLeaderBoard
- providerApple.showLeaderBoard
*/
}
});
AuthV4.Helper.showLeaderboard(new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.helper.syncAccount
- AuthV4.helper.connect
- providerGoogle.showLeaderBoard
- providerApple.showLeaderBoard
*/
}
}
});
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
[helper showLeaderboard:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {
switch (result.code) {
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.helper.syncAccount
- AuthV4.helper.connect
- providerGoogle.showLeaderBoard
- providerApple.showLeaderBoard
*/
}
}];
| Code | Message | How to solve |
|---|---|---|
| AuthV4NotInitialized | HIVE SDK is not initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| AuthV4SigninFirst | Not logged in. | Call the AuthV4.helper.signIn API to log in. View API |
| AuthV4InProgressShowLeaderboard | LeaderBoard exposure is already in progress. | If the AuthV4.Helper.leaderboard API is already in progress, duplicate API calls are not possible. Please end the previous function before calling. |
| AuthV4InProgressSignIn | SignIn is already in progress. | If the AuthV4.Helper.signIn API is already in progress, duplicate API calls are not possible. Please end the previous function before calling. |
| AuthV4AppleNotSupported | Not a provider that can be linked to HIVE. | Please configure the provider to be used with HIVE. |
| AuthV4.helper.syncAccount API response value is the same as the response value. | An error occurred while checking if the provider account linked to the account is the same as the account logged in on the device. | Please check the AuthV4.helper.syncAccount ResultAPI code. |
| AuthV4.helper.connect API response value is the same as the response value. | An error occurred while linking the account logged in on the device to the currently logged in account. | Please check the AuthV4.helper.connect ResultAPI code. |
| providerGoogle.showLeaderBoard API response value is the same as the response value. | An error occurred while calling the LeaderBoard function for the provider suitable for each OS. | Please check the ResultAPI codes for providerGoogle.showLeaderBoard and providerApple.showLeaderBoard. |
| providerApple.showLeaderBoard API response value is the same as the response value. | An error occurred while calling the LeaderBoard function for the provider suitable for each OS. | Please check the ResultAPI codes for providerGoogle.showLeaderBoard and providerApple.showLeaderBoard. |
AuthV4.Helper.showAchievements¶
AuthV4::Helper::showAchievements([](ResultAPI const & result, std::shared_ptr<PlayerInfo> playerInfo){
switch(result.code) {
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.helper.syncAccount
- AuthV4.helper.connect
- providerGoogle.showAchievements
- providerApple.showAchievements
*/
}
});
AuthV4.Helper.showAchievements(new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.helper.syncAccount
- AuthV4.helper.connect
- providerGoogle.showAchievements
- providerApple.showAchievements
*/
}
}
});
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
[helper showAchievements:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {
switch (result.code) {
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.helper.syncAccount
- AuthV4.helper.connect
- providerGoogle.showAchievements
- providerApple.showAchievements
*/
}
}];
| Code | Message | How to solve |
|---|---|---|
| AuthV4NotInitialized | HIVE SDK is not initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| AuthV4SigninFirst | Not logged in. | Call the AuthV4.helper.signIn API to log in. View API |
| AuthV4InProgressShowAchievements | ShowAchievements is already in progress. | If the AuthV4.Helper.showAchievements API is already in progress, duplicate API calls are not possible. Please finish the previous function before calling again. |
| AuthV4InProgressSignIn | SignIn is already in progress. | If the AuthV4.Helper.signIn API is already in progress, duplicate API calls are not possible. Please finish the previous function before calling again. |
| AuthV4AppleNotSupported | Not a supported provider for HIVE. | Please set up the provider to be used with HIVE. |
| The response value is the same as that of the AuthV4.helper.syncAccount API. | An error occurred while checking if the provider account linked to the account is the same as the account logged in on the device. | Please check the AuthV4.helper.syncAccount ResultAPI code. |
| The response value is the same as that of the AuthV4.helper.connect API. | An error occurred while linking the account logged in on the device to the currently logged-in account. | Please check the AuthV4.helper.connect ResultAPI code. |
| The response value is the same as that of the providerGoogle.showAchievements API. | An error occurred while calling the achievements function for the provider suitable for each OS. | Please check the ResultAPI codes for providerGoogle.showAchievements and providerApple.showAchievements respectively. |
| The response value is the same as that of the providerApple.showAchievements API. | An error occurred while calling the achievements function for the provider suitable for each OS. | Please check the ResultAPI codes for providerGoogle.showAchievements and providerApple.showAchievements respectively. |
AuthV4.Helper.showConflict¶
AuthV4.Helper.showConflict((ResultAPI result, AuthV4.PlayerInfo playerInfo) =>{
switch(result.code) {
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.resolveConflict
- AuthV4.selectConflict
*/
case ResultAPI.Code.AuthV4NotRegisteredDevice:
// This occurs when device authentication fails and the user is signed out. Try signing in again with AUTO or sign out.
break;
}
});
AuthV4::Helper::showConflict([](ResultAPI const & result, std::shared_ptr<PlayerInfo> playerInfo){
switch(result.code) {
/*
The same ResultAPI code as the function below is passed.
- AuthV4.resolveConflict
- AuthV4.selectConflict
*/
case ResultAPI::Code::AuthV4NotRegisteredDevice:
// This is the case when login is disconnected due to device authentication failure. Try to re-login automatically or log out.
break;
}
});
AuthV4.Helper.showConflict(new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.resolveConflict
- AuthV4.selectConflict
*/
case AuthV4NotRegisteredDevice:
// This occurs when device authentication fails and the user is signed out. Try signing in again with AUTO or sign out.
break;
}
}
});
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
[helper showConflict:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {
switch (result.code) {
/*
The same ResultAPI code as the function below is delivered.
- AuthV4.resolveConflict
- AuthV4.selectConflict
*/
case kAuthV4NotRegisteredDevice:
// This occurs when device authentication fails and the user is signed out. Try signing in again with AUTO or sign out.
break;
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4ConflictPlayer | [When using custom UI] An account conflict occurred. | Display the account conflict UI so the conflict can be resolved. |
| Delivers the same response value as the AuthV4.resolveConflict API response. | [When not using custom UI] An error occurred while attempting to switch accounts after an account conflict occurred. | Check the AuthV4.resolveConflict ResultAPI code. |
| Delivers the same response value as the AuthV4.selectConflict API response. | [When not using custom UI] An error occurred while attempting to switch accounts after an account conflict occurred. | Check the AuthV4.selectConflict ResultAPI code. |
| AuthV4NotRegisteredDevice | This is an unauthenticated device. | During an account conflict, device authentication failed while switching to the selected account and the user was signed out. Try signing in again with AUTO or sign out. |
AuthV4.Helper.showConflict¶
Int64 playerId = 10000000000;
AuthV4.Helper.ConflictSingleViewInfo viewInfo = new AuthV4.Helper.ConflictSingleViewInfo(playerId);
viewInfo.setValue("key_int",123);
viewInfo.setValue("key_double",12.333);
viewInfo.setValue("key_str","Player1");
AuthV4.Helper.showConflict(viewInfo, (ResultAPI result, AuthV4.PlayerInfo playerInfo) =>{
switch(result.code) {
case ResultAPI.Code.AuthV4PlayerChange:
// Please proceed to play the game with the switched account.
break;
...
// Additionally, the same ResultAPI code as AuthV4.helper.showConflict will be passed.
case ResultAPI.Code.AuthV4NotRegisteredDevice:
// This is the case where login has been disconnected due to device authentication failure. Try to re-login automatically or log out.
break;
}
});
PlayerID playerId = 10000000000;
ConflictSingleViewInfo* info = new ConflictSingleViewInfo(playerId);
info->SetValue("key_int", 123);
info->SetValue("key_double", 12.333);
info->SetValue("key_str", "Player1");
AuthV4::Helper::syncAccount(info, [](ResultAPI const & result, std::shared_ptr<PlayerInfo> playerInfo){
switch(result.code) {
case ResultAPI::Code::AuthV4PlayerChange:
// Please proceed with gameplay using the switched account.
break;
...
// Additionally, the same ResultAPI code as AuthV4.helper.showConflict will be passed.
case ResultAPI::Code::AuthV4NotRegisteredDevice:
// This is the case where login has been disconnected due to device authentication failure. Please try to re-login automatically or log out.
break;
}
});
long playerId = 10000000000l;
AuthV4.Helper.ConflictSingleViewInfo viewInfo = new AuthV4.Helper.ConflictSingleViewInfo(playerId);
viewInfo.setValue("key_int",123);
viewInfo.setValue("key_double",12.333);
viewInfo.setValue("key_str","Player1");
AuthV4.Helper.showConflict(viewInfo, new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
case AuthV4PlayerChange:
// Please proceed to play the game with the switched account.
break;
...
// Additionally, the same ResultAPI code as AuthV4.helper.showConflict will be passed.
case AuthV4NotRegisteredDevice:
// This is the case where login has been disconnected due to device authentication failure. Please try to log in again automatically or log out.
break;
}
}
});
int64_t playerId = 10000000000;
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
HIVEConflictSingleViewInfo *viewInfo = [[HIVEConflictSingleViewInfo alloc] initWithPlayerId:playerId];
[viewInfo setValue:@"key_int" intValue:123];
[viewInfo setValue:@"key_double" doubleValue:12.333];
[viewInfo setValue:@"key_str" stringValue:@"Player1"];
[helper showConflict:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {
switch (result.code) {
case kAuthV4PlayerChange:
// Please proceed with the game play using the switched account.
break;
//...
// Additionally, the same ResultAPI code as AuthV4.helper.showConflict will be passed.
case kAuthV4NotRegisteredDevice:
// This is the case where login has been disconnected due to device authentication failure. Try to re-login automatically or log out.
break;
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required Implementation) AuthV4PlayerChange | The account has been switched. | Please proceed with gameplay using the switched account. |
| AuthV4InvalidConflictInfo | No account conflict has occurred. | No account conflict has occurred. Please call this only in situations where an account conflict has occurred. |
| AuthV4.showConflict API response value is the same as the response value. | An error occurred while displaying the account conflict resolution UI. | Please check the AuthV4.showConflict ResultAPI code. |
| AuthV4NotRegisteredDevice | This is an unregistered device. | In the case of an account conflict, this occurs when device authentication fails while switching to the selected account, resulting in a logout. Please attempt to re-login automatically or log out. |
AuthV4.Helper.switchAccount¶
AuthV4.Helper.switchAccount((ResultAPI result, AuthV4.PlayerInfo playerInfo) => {
switch(result.code) {
case ResultAPI.Code.AuthV4PlayerChange:
// Proceed with gameplay using the switched account.
break;
...
// The same ResultAPI code as AuthV4.selectConflict is also delivered.
case ResultAPI.Code.AuthV4NotRegisteredDevice:
// This occurs when device authentication fails and the user is signed out. Try signing in again with AUTO or sign out.
break;
}
});
AuthV4::Helper::switchAccount([](ResultAPI const & result, std::shared_ptr<PlayerInfo> playerInfo){
switch(result.code) {
case ResultAPI::Code::AuthV4PlayerChange:
// Proceed with gameplay using the switched account.
break;
...
// The same ResultAPI code as AuthV4.selectConflict is also delivered.
case ResultAPI::Code::AuthV4NotRegisteredDevice:
// This occurs when device authentication fails and the user is signed out. Try signing in again with AUTO or sign out.
break;
}
});
AuthV4.Helper.switchAccount(new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
case AuthV4PlayerChange:
// Proceed with gameplay using the switched account.
break;
...
// The same ResultAPI code as AuthV4.selectConflict is also delivered.
case AuthV4NotRegisteredDevice:
// This occurs when device authentication fails and the user is signed out. Try signing in again with AUTO or sign out.
break;
}
}
});
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
[helper switchAccount:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {
switch (result.code) {
case kAuthV4PlayerChange:
// Proceed with gameplay using the switched account.
break;
//...
// The same ResultAPI code as AuthV4.selectConflict is also delivered.
case kAuthV4NotRegisteredDevice:
// This occurs when device authentication fails and the user is signed out. Try signing in again with AUTO or sign out.
break;
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4PlayerChange | The account has been switched. | Proceed with gameplay using the switched account. |
| AuthV4InvalidConflictInfo | No account conflict has occurred. | No account conflict has occurred. Call this only when an account conflict has occurred. |
| Delivers the same response value as the AuthV4.selectConflict API response. | An error occurred while switching to the account with the conflict. | Check the AuthV4.selectConflict ResultAPI code. |
| AuthV4NotRegisteredDevice | This is an unauthenticated device. | During an account conflict, device authentication failed while switching to the selected account and the user was signed out. Try signing in again with AUTO or sign out. |
AuthV4.Helper.resolveConflict¶
AuthV4::Helper::resolveConflict([](ResultAPI const & result, std::shared_ptr<PlayerInfo> playerInfo){
switch(result.code) {
case ResultAPI::Code::AuthV4PlayerResolved:
// Continue gameplay with the existing account.
break;
...
// The same ResultAPI code as AuthV4.resolveConflict is also delivered.
}
});
AuthV4.Helper.resolveConflict(new AuthV4.Helper.AuthV4HelperListener() {
@Override
public void onAuthV4Helper(ResultAPI result, AuthV4.PlayerInfo playerInfo) {
switch(result.code) {
case AuthV4PlayerResolved:
// Continue gameplay with the existing account.
break;
...
// The same ResultAPI code as AuthV4.resolveConflict is also delivered.
}
}
});
HIVEAuthV4Helper *helper = [HIVEAuthV4 helper];
[helper resolveConflict:^(HIVEResultAPI *result, HIVEPlayerInfo *playerInfo) {
switch (result.code) {
case kAuthV4PlayerResolved:
// Continue gameplay with the existing account.
break;
//...
// The same ResultAPI code as AuthV4.resolveConflict is also delivered.
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) AuthV4PlayerResolved | Account switching was not performed. | Continue gameplay with the existing account. |
| AuthV4InvalidConflictInfo | No account conflict has occurred. | No account conflict has occurred. Call this only when an account conflict has occurred. |
| Delivers the same response value as the AuthV4.resolveConflict API response. | An error occurred while resolving the account conflict. | Check the AuthV4.resolveConflict ResultAPI code. |
AuthV4.Helper.getIDPList¶
| Code | Message | How to solve |
|---|---|---|
| No Result API |
AuthV4.Helper.showGameCenterLoginCancelDialog¶
| Code | Message | Resolution |
|---|---|---|
| No Result API |
