Skip to main content

AutoLogin

AndroidiOSWindows
If you were looking for the method for use with Unity, see AutoLogin for Unity SDK.

Player Network SDK obtains the local authentication state, and validates the authentication state with the SDK server. If there is no local cache of the authentication state, or the server fails to validate the authentication state, AutoLogin callback failure is returned.

note

To access the custom account, you need to SetAccountInfo.

note

If games set LOGIN_NETWORK_ERROR_CLEAR_AUTH_RESULT_ENABLE to false, when AutoLogin fails (for example, because the authentication token has expired), the returned AuthResult will contain the channel, channel ID, user name, and picture URL information of the previous AutoLogin account. In addition, if the previous AutoLogin account used is a custom account, the additional JSON field of AuthResult will also include the account (such as the email or phone number used for registration).

Function definition

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

Observers

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

The callback methodID is kMethodIDAuthAutoLogin.

Code sample

UINTLSDKAPI::AutoLogin();