Forcibly trying to map the currently authenticated user identifier of Gamebase with the credential of external authentication provider.
public void AddMappingForciblyWithCredentialInfoSample(Dictionary<string, object> credential)
{
{
{
}
else
{
if (error.code.Equals(GamebaseErrorCode.AUTH_ADD_MAPPING_ALREADY_MAPPED_TO_OTHER_MEMBER) == true)
{
GamebaseResponse.Auth.ForcingMappingTicket forcingMappingTicket = GamebaseResponse.Auth.ForcingMappingTicket.From(error);
if (forcingMappingTicket == null)
{
}
Gamebase.AddMappingForcibly(credential, forcingMappingTicket.forcingMappingKey, (innerAuthToken, innerError) =>
{
if (Gamebase.IsSuccess(innerError) == true)
{
string userId = innerAuthToken.member.userId;
Debug.Log(string.Format("AddMappingForcibly succeeded. Gamebase userId is {0}", userId));
}
else
{
Debug.Log(string.Format("AddMappingForcibly failed. error is {0}", innerError));
}
});
}
else
{
Debug.Log(string.Format("AddMapping failed. error is {0}", error));
}
}
});
}
static void AddMapping(string providerName, GamebaseCallback.GamebaseDelegate< GamebaseResponse.Auth.AuthToken > callback)
Try mapping to another IdP while logged-in to a specific IdP.
Definition Gamebase.cs:1039
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition Gamebase.cs:57
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11