Gamebase SDK for Unity  1.1.5
Toast Gamebase Platform

◆ Login() [3/3]

static void Login ( Dictionary< string, object >  credentialInfo,
GamebaseCallback.GamebaseDelegate< GamebaseResponse.Auth.AuthToken >  callback 
)
static

Try to login with credential information received from External SDK or OAuth.

Parameters
providerNameProvider name
credentialInfoCredential info
callbackCallback. delegate(GamebaseResponse.Auth.AuthToken data, GamebaseError error)

This sample shows how to call the Gamebase.Login method.

public void Login(Dictionary<string, object> credentialInfo)
{
Gamebase.Login(credentialInfo, (authToken, error) =>
{
if (Gamebase.IsSuccess(error))
{
string userId = authToken.member.userId;
Debug.Log(string.Format("Login succeeded. Gamebase userId is {0}", userId));
}
else
{
Debug.Log(string.Format("Login failed. error is {0}", error));
}
});
}