Skip to main content
Version: 5.11.8

ChangeCustomToFederation

public BackendReturnObject ChangeCustomToFederation(string federationToken, FederationType type);

Parameters

ValueTypeDescription
federationTokenstringFederation access token
typeFederationType(enum)Federation type.
FederationType.Google
FederationType.Facebook
FederationType.Apple
FederationType.Steam
FederationType.GPGS2

Description

This is a function for switching the customer ID in BACKND SDK to a federation account.
Once the custom account user logs in and calls the ChangeCustomToFederation method, the user can be switched into a federation account.
For more information on federationToken and type required for ChangeCustomToFederation, please refer to the federation authentication documentation.
If email permission was not added when switching a custom account into a federation account, the custom ID is displayed as the member ID.

Example

Synchronous

BackendReturnObject bro = Backend.BMember.ChangeCustomToFederation("federationToken", FederationType.Google);
if(bro.IsSuccess())
{
Debug.Log("Login type changed successfully");
}

Asynchronous

Backend.BMember.ChangeCustomToFederation("federationToken", FederationType.Google , callback => {
if(callback.IsSuccess())
{
Debug.Log("Login type changed successfully");
}
});

SendQueue

SendQueue.Enqueue(Backend.BMember.ChangeCustomToFederation,  "federationToken", FederationType.Google, callback => {
if(callback.IsSuccess())
{
Debug.Log("Login type changed successfully");
}
});

Return cases

Success cases

When the switching is successful
statusCode : 204

Error cases

When ChangeCustomToFederation was completed but another attempt is made
statusCode : 400
errorCode : BadParameterException

When there is an attempt without customLogin
statusCode : 400
errorCode : UndefinedParameterException

If the token value used in the federation switch was sent as null
statusCode : 400
errorCode : UndefinedParameterException

When there is an attempt to change the custom ID that is already signed up as a federation account
statusCode : 409
errorCode : DuplicatedParameterException