Gamebase SDK for Unity  2.3.0
Toast Gamebase Platform

◆ LoginForLastLoggedInProvider()

static void LoginForLastLoggedInProvider ( GamebaseCallback.GamebaseDelegate< GamebaseResponse.Auth.AuthToken >  callback)
static

Try login with the most recently logged-in IdP.

If a token is expired or its authentication fails, return failure. Note that a login for the IdP should be implemented.

Since
Added 1.4.0.
Parameters
callbackLogin result callback, returns the authentication token as a result of login.

Example Usage :

{
Gamebase.LoginForLastLoggedInProvider((authToken, error) =>
{
if (Gamebase.IsSuccess(error))
{
Debug.Log("LoginForLastLoggedInProvider is succeeded.");
}
else
{
if (error.code == GamebaseErrorCode.SOCKET_ERROR || error.code == GamebaseErrorCode.SOCKET_RESPONSE_TIMEOUT)
{
Debug.Log(string.Format("Retry LoginForLastLoggedInProvider or notify an error message to the user. : {0}", error.message));
}
else
{
Debug.Log("Try to login using a specifec IdP");
}
}
});
}