Skip to main content
Version: 5.11.8

AuthorizeFederation

public BackendReturnObject AuthorizeFederation(string federationToken, FederationType type);
public BackendReturnObject AuthorizeFederation(string federationToken, FederationType type, string ect);

Parameters

ValueTypeDescription
federationTokenstringFederation token
typeFederationType(enum)Federation type.
FederationType.Google
FederationType.Facebook
FederationType.Apple
FederationType.Steam
FederationType.GPGS2
etcstring(Optional) The piece of information desired to be saved from the additional information

Description

An attempt is made to sign up or log in using the member information token value of Google/Apple/Facebook.

  • If the user has no history of signing up with the token, a login is attempted at the same time as the sign-up.
  • If the user has a history of signing up with the token, a login is attempted.

Example

Synchronous

Backend.BMember.AuthorizeFederation("federationToken" , FederationType.Google, "Signed up with GPGS");

Asynchronous

Backend.BMember.AuthorizeFederation("federationToken" , FederationType.Google, "Signed up with GPGS", callback =>
{
// Process after federation authentication
});

SendQueue

SendQueue.Enqueue(Backend.BMember.AuthorizeFederation, "federationToken", FederationType.Google, "Signed up with GPGS", callback =>
{
// Process after federation authentication
});

Return cases

Success cases

When the login is successful
statusCode : 200

When signing up as a new member is successful
statusCode : 201

Error cases

When the device information is 'null'
statusCode : 400
errorCode : UndefinedParameterException

When the account is blocked
statusCode : 403
errorCode : Reason for blocking entered in the console

When the device is blocked
statusCode : 403
errorCode : ForbiddenException

When withdrawal is in progress(after calling the WithdrawAccount method)
statusCode : 410
errorCode : GoneResourceException

When the withdrawal is completed, the new sign-up takes place as 201.


Federation account logout

If you want to log out from the currently logged-in federation account and switch to another federation user,

you must log out from the BACKND account and then log out from the federation account to properly log in to another federation account.
After logging in to another federation account, you must call the AuthorizeFederation method to the BACKND account again to successfully play a game with the new account.

How to log out from GPGS

public void GoogleSignout(){
GoogleSignIn.DefaultInstance.SignOut();
}

How to log out from Facebook

public void FacebookLogOut(){
FB.LogOut();
}