Change logged in account with ForcingMappingTicket.
public void ChangeLoginSample()
{
{
if (Gamebase.IsSuccess(error) == true)
{
}
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.ChangeLogin(forcingMappingTicket, (innerAuthToken, innerError) =>
{
if (Gamebase.IsSuccess(innerError) == true)
{
string userId = innerAuthToken.member.userId;
Debug.Log(string.Format("ChangeLogin succeeded. Gamebase userId is {0}", userId));
}
else
{
Debug.Log(string.Format("ChangeLogin 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
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11