Skip to main content

AutoLogin

AndroidiOSWindows
If you're using the Unity engine, see the AutoLogin for Unity SDK.

The Player Network SDK retrieves local authentication status and verifies it through the SDK server.If the authentication status is not cached locally or cannot be verified by the server.AutoLogin callback failed and was returned.

note

For self-built account integration, use SetAccountInfo.

note

If the game configuration LOGIN_NETWORK_ERROR_CLEAR_AUTH_RESULT_ENABLE is set to false, on AutoLogin failure (e.g., due to expired authentication token), the returned AuthResult will include the channel, channel ID, username, and image URL of the previously used AutoLogin account, guiding users to re-login by displaying this information.Additionally, if the last used AutoLogin account is a self-built account, the AuthResult will have an extra JSON field including the account (i.e., the email or phone number used for registration).

Function definition

UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool AutoLogin();

Callback processing

The callback processing interface is AuthResultObserver.The callback data structure is AuthResult.

The callback ID is kMethodIDAuthAutoLogin.

Code example

UINTLSDKAPI::AutoLogin();