Gamebase SDK for Unity  1.10.0
Toast Gamebase Platform

◆ Login() [3/3]

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

This game interface allows authentication to be made with SDK provided by IdP, before login to Gamebase with provided access token.

Since
Added 1.4.0.
Parameters
providerNameThe providerName which is authentication provider.
credentialInfoThe credentialInfo which is credential of authentication provider.
callbackLogin result callback, returns the authentication token as a result of login.

Example Usage :

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));
}
});
}