SDK for / Overview

UXsollaLoginSubsystem Class Reference

Inheritance diagram for UXsollaLoginSubsystem:

Public Member Functions

virtual void Initialize (FSubsystemCollectionBase &Collection) override
 
virtual void Deinitialize () override
 
void Initialize (const FString &InProjectId, const FString &InLoginId, const FString &InClientId)
 
void RegisterUser (const FString &Username, const FString &Password, const FString &Email, const FString &State, const FString &Locale, const bool PersonalDataProcessingConsent, const bool ReceiveNewsConsent, const TMap< FString, FString > &AdditionalFields, const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void ResendAccountConfirmationEmail (const FString &Username, const FString &State, const FString &Locale, const FOnRequestSuccess &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void AuthenticateUser (const FString &Username, const FString &Password, const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback, const bool bRememberMe=false)
 
void AuthWithXsollaWidget (UObject *WorldContextObject, UXsollaLoginBrowserWrapper *&BrowserWidget, const FOnAuthUpdate &SuccessCallback, const FOnAuthCancel &CancelCallback, const FOnAuthError &ErrorCallback, const bool bRememberMe=false, const FString &Locale=TEXT(""), const FString &State=TEXT("xsollatest"))
 
void ResetUserPassword (const FString &User, const FString &Locale, const FOnRequestSuccess &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void ValidateToken (const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void GetSocialAuthenticationUrl (const FString &ProviderName, const FString &State, const FOnSocialUrlReceived &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void LaunchSocialAuthentication (UObject *WorldContextObject, UUserWidget *&BrowserWidget, const bool bRememberMe=false)
 
void LaunchNativeSocialAuthentication (const FString &ProviderName, const FOnAuthUpdate &SuccessCallback, const FOnAuthCancel &CancelCallback, const FOnAuthError &ErrorCallback, const bool bRememberMe=false, const FString &State=TEXT("xsollatest"))
 
void AuthenticateViaSocialNetwork (const FString &ProviderName, const FOnAuthUpdate &SuccessCallback, const FOnAuthCancel &CancelCallback, const FOnAuthError &ErrorCallback, const bool bRememberMe=false, const FString &State=TEXT("xsollatest"))
 
void SetToken (const FString &Token)
 
void RefreshToken (const FString &RefreshToken, const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void ExchangeAuthenticationCodeToToken (const FString &AuthenticationCode, const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void AuthenticateWithSessionTicket (const FString &ProviderName, const FString &SessionTicket, const FString &Code, const FString &AppId, const FString &State, const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void GetUserAttributes (const FString &AuthToken, const FString &UserId, const TArray< FString > &AttributeKeys, const FOnUserAttributesUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetUserReadOnlyAttributes (const FString &AuthToken, const FString &UserId, const TArray< FString > &AttributeKeys, const FOnUserAttributesUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void ModifyUserAttributes (const FString &AuthToken, const TArray< FXsollaUserAttribute > &AttributesToModify, const FOnRequestSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void RemoveUserAttributes (const FString &AuthToken, const TArray< FString > &AttributesToRemove, const FOnRequestSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void CreateAccountLinkingCode (const FString &AuthToken, const FOnCodeReceived &SuccessCallback, const FOnError &ErrorCallback)
 
void CheckUserAge (const FString &DateOfBirth, const FOnCheckUserAgeSuccess &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void LinkEmailAndPassword (const FString &AuthToken, const FString &Email, const FString &Password, const bool ReceiveNewsConsent, const FString &Username, const FOnLinkEmailAndPasswordSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void LinkDeviceToAccount (const FString &AuthToken, const FString &PlatformName, const FString &DeviceName, const FString &DeviceId, const FOnRequestSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void UnlinkDeviceFromAccount (const FString &AuthToken, const int64 DeviceId, const FOnRequestSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void AuthenticateViaDeviceId (const FString &DeviceName, const FString &DeviceId, const FString &State, const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void AuthViaAccessTokenOfSocialNetwork (const FString &AuthToken, const FString &AuthTokenSecret, const FString &OpenId, const FString &ProviderName, const FString &State, const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void StartAuthByPhoneNumber (const FString &PhoneNumber, const FString &State, const FOnStartAuthSuccess &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void CompleteAuthByPhoneNumber (const FString &Code, const FString &OperationId, const FString &PhoneNumber, const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void StartAuthByEmail (const FString &Email, const FString &State, const FOnStartAuthSuccess &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void CompleteAuthByEmail (const FString &Code, const FString &OperationId, const FString &Email, const FOnAuthUpdate &SuccessCallback, const FOnAuthError &ErrorCallback)
 
void GetAuthConfirmationCode (const FString &UserId, const FString &OperationId, const FOnAuthCodeSuccess &SuccessCallback, const FOnAuthCodeTimeout &TimeoutCallback, const FOnAuthError &ErrorCallback)
 
void GetUserDetails (const FString &AuthToken, const FOnUserDetailsUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void ModifyUserDetails (const FString &AuthToken, const FString &Birthday, const FString &FirstName, const FString &LastName, const FString &Gender, const FString &Nickname, const FOnUserDetailsUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetUserEmail (const FString &AuthToken, const FOnUserDetailsParamUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetUserPhoneNumber (const FString &AuthToken, const FOnUserDetailsParamUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void ModifyUserPhoneNumber (const FString &AuthToken, const FString &PhoneNumber, const FOnUserDetailsParamUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void RemoveUserPhoneNumber (const FString &AuthToken, const FString &PhoneNumber, const FOnRequestSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void ModifyUserProfilePicture (const FString &AuthToken, UTexture2D *const Picture, const FOnUserDetailsParamUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void RemoveProfilePicture (const FString &AuthToken, const FOnRequestSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void GetFriends (const FString &AuthToken, const EXsollaFriendsType Type, const EXsollaUsersSortCriteria SortBy, const EXsollaUsersSortOrder SortOrder, const FOnUserFriendsUpdate &SuccessCallback, const FOnError &ErrorCallback, const FString &After, const int Limit=20)
 
void ModifyFriends (const FString &AuthToken, const EXsollaFriendAction Action, const FString &UserID, const FOnRequestSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void GetSocialAuthLinks (const FString &AuthToken, const FString &Locale, const FOnSocialAuthLinksUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetSocialFriends (const FString &AuthToken, const FString &Platform, const FOnUserSocialFriendsUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Offset=0, const int Limit=500, const bool FromThisGame=false)
 
void GetUsersFriends (const FString &AuthToken, const FString &Platform, const FOnCodeReceived &SuccessCallback, const FOnError &ErrorCallback)
 
void GetUserProfile (const FString &AuthToken, const FString &UserID, const FOnUserProfileReceived &SuccessCallback, const FOnError &ErrorCallback)
 
void GetUsersDevices (const FString &AuthToken, const FOnUserDevicesUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void SearchUsersByNickname (const FString &AuthToken, const FString &Nickname, const FOnUserSearchUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Offset=0, const int Limit=100)
 
void LinkSocialNetworkToUserAccount (const FString &AuthToken, const FString &ProviderName, const FOnSocialAccountLinkingHtmlReceived &SuccessCallback, const FOnError &ErrorCallback)
 
void UnlinkSocialNetworkFromUserAccount (const FString &AuthToken, const FString &ProviderName, const FOnRequestSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void GetLinkedSocialNetworks (const FString &AuthToken, const FOnLinkedSocialNetworksUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void LogoutUser (const FString &AuthToken, const EXsollaSessionType Sessions, const FOnRequestSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
FXsollaLoginData GetLoginData () const
 
void SetLoginData (const FXsollaLoginData &Data, const bool ClearCache=true)
 
void UpdateAuthTokenData (const FString &AccessToken, int ExpiresIn, const FString &RefreshToken, bool bRememberMe=true)
 
void DropLoginData (const bool ClearCache=true)
 
void LoadSavedData ()
 
void SaveData ()
 
void HandleRequestError (const XsollaHttpRequestError &ErrorData, FErrorHandlersWrapper ErrorHandlersWrapper)
 

Protected Member Functions

void Default_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnRequestSuccess SuccessCallback, FOnAuthError ErrorCallback)
 
void DefaultWithHandlerWrapper_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnRequestSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void UserLogin_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void TokenVerify_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void SocialAuthUrl_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnSocialUrlReceived SuccessCallback, FOnAuthError ErrorCallback)
 
void GetUserAttributes_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserAttributesUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetReadOnlyUserAttributes_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserAttributesUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void AccountLinkingCode_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnCodeReceived SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void CheckUserAge_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnCheckUserAgeSuccess SuccessCallback, FOnAuthError ErrorCallback)
 
void DeviceId_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void RefreshToken_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void InnerRefreshToken_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnLoginDataUpdate SuccessCallback, FOnLoginDataError ErrorCallback)
 
void SessionTicket_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void AuthViaAccessTokenOfSocialNetwork_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void StartAuth_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnStartAuthSuccess SuccessCallback, FOnAuthError ErrorCallback)
 
void CompleteAuthByPhoneNumber_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void CompleteAuthByEmail_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void GetAuthConfirmationCode_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthCodeSuccess SuccessCallback, FOnAuthCodeTimeout TimeoutCallback, FOnAuthError ErrorCallback)
 
void UserDetails_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserDetailsUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void UserEmail_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserDetailsParamUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void UserPhoneNumber_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserDetailsParamUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void ModifyPhoneNumber_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserDetailsParamUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void RemovePhoneNumber_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnRequestSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void UserProfilePicture_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserDetailsParamUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void UserProfilePictureRemove_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnRequestSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void UserFriends_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserFriendsUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void SocialAuthLinks_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnSocialAuthLinksUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void SocialFriends_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserSocialFriendsUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetUsersFriends_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnCodeReceived SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void UserProfile_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserProfileReceived SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void UserSearch_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserSearchUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void SocialAccountLinking_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnSocialAccountLinkingHtmlReceived SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void LinkedSocialNetworks_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnLinkedSocialNetworksUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetUsersDevices_HttpRequestComplete (const FHttpRequestPtr HttpRequest, const FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnUserDevicesUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void LinkEmailAndPassword_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnLinkEmailAndPasswordSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void RegisterUser_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void LogoutUser_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnRequestSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void HandleOAuthTokenRequest (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded, FOnAuthError &ErrorCallback, FOnAuthUpdate &SuccessCallback)
 
void HandleUrlWithCodeRequest (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnAuthUpdate SuccessCallback, FOnAuthError ErrorCallback)
 
void HandleRequestOAuthError (XsollaHttpRequestError ErrorData, FOnAuthError ErrorCallback)
 
void InnerRefreshToken (const FString &RefreshToken, const FOnLoginDataUpdate &SuccessCallback, const FOnLoginDataError &ErrorCallback)
 
void SocialAuthUrlReceivedCallback (const FString &Url)
 

Protected Attributes

FXsollaLoginData LoginData
 

Member Function Documentation

◆ AuthenticateUser()

void UXsollaLoginSubsystem::AuthenticateUser (const FString & Username,
const FString & Password,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback,
const bool bRememberMe = false 
)

Authenticates the user by the username/email and password specified via the authentication interface. More about the use cases.

Parameters
UsernameUsername or email.
PasswordPassword.
SuccessCallbackCalled after successful user authentication. Authentication data including the JWT will be received.
ErrorCallbackCalled after the request resulted with an error.
bRememberMeWhether the user agrees to save the authentication data. Default is false.

◆ AuthenticateViaDeviceId()

void UXsollaLoginSubsystem::AuthenticateViaDeviceId (const FString & DeviceName,
const FString & DeviceId,
const FString & State,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Authenticates the user via a particular device ID. More about the use cases.

Parameters
DeviceNameManufacturer and model name of the device.
DeviceIdPlatform specific unique device ID.
For Android, it is an ANDROID_ID constant.
For iOS, it is an identifierForVendor property.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.
SuccessCallbackCalled after successful user authentication via the device ID.
ErrorCallbackCalled after the request resulted with an error.

◆ AuthenticateViaSocialNetwork()

void UXsollaLoginSubsystem::AuthenticateViaSocialNetwork (const FString & ProviderName,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthCancel & CancelCallback,
const FOnAuthError & ErrorCallback,
const bool bRememberMe = false,
const FString & State = TEXT("xsollatest") 
)

Authenticates user via social networks. Method incapsulates web-based and native authentication methods.

Parameters
ProviderNameName of the social network connected to Login in Publisher Account. Can be amazon, apple, baidu, battlenet, discord,facebook, github, google, kakao, linkedin, mailru, microsoft, msn, naver, ok, paypal, psn, qq, reddit, steam, twitch, twitter, vimeo, vk, wechat, weibo, yahoo, yandex, youtube, or xbox.
SuccessCallbackCalled after successful user authentication. Authentication data including the JWT will be received.
CancelCallbackCalled after user authentication was canceled.
ErrorCallbackCalled after user authentication resulted with an error.
bRememberMeWhether the user agrees to save the authentication data. Default is false.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.

◆ AuthenticateWithSessionTicket()

void UXsollaLoginSubsystem::AuthenticateWithSessionTicket (const FString & ProviderName,
const FString & SessionTicket,
const FString & Code,
const FString & AppId,
const FString & State,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Authenticates a user by exchanging the session ticket from Steam, Xbox, or Epic Games to the JWT. More about the use cases.

Parameters
ProviderNamePlatform on which the session ticket was obtained. Can be steam, xbox, or epicgames.
SessionTicketSession ticket received from the platform.
CodeCode received from the platform.
AppIdPlatform application identifier.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.
SuccessCallbackCalled after successful user authentication with a platform session ticket. Authentication data including a JWT will be received.
ErrorCallbackCalled after the request resulted with an error.

◆ AuthViaAccessTokenOfSocialNetwork()

void UXsollaLoginSubsystem::AuthViaAccessTokenOfSocialNetwork (const FString & AuthToken,
const FString & AuthTokenSecret,
const FString & OpenId,
const FString & ProviderName,
const FString & State,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Authenticates the user with the access token using social network credentials.

Parameters
AuthTokenAccess token received from a social network.
AuthTokenSecretParameter oauth_token_secret received from the authorization request. Required for Twitter only.
OpenIdParameter openid received from the social network. Required for WeChat only.
ProviderNameName of the social network connected to Login in Publisher Account. Can be facebook, google, linkedin, twitter, discord, naver, baidu, wechat, or qq_mobile.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.
SuccessCallbackCalled after successful user authentication on the specified platform.
ErrorCallbackCalled after the request resulted with an error.

◆ AuthWithXsollaWidget()

void UXsollaLoginSubsystem::AuthWithXsollaWidget (UObject * WorldContextObject,
UXsollaLoginBrowserWrapper *& BrowserWidget,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthCancel & CancelCallback,
const FOnAuthError & ErrorCallback,
const bool bRememberMe = false,
const FString & Locale = TEXT(""),
const FString & State = TEXT("xsollatest") 
)

Authenticates the user with Xsolla Login widget.

Parameters
WorldContextObjectThe world context.
BrowserWidgetWidget that shows the social network authentication form. Can be set in the project settings.
SuccessCallbackCalled after successful user authentication. Authentication data including the JWT will be received.
CancelCallbackCalled after user authentication was canceled.
ErrorCallbackCalled after user authentication resulted with an error.
bRememberMeWhether the user agrees to save the authentication data. false by default.
Locale(optional) Login widget UI language. Supported languages: Arabic (ar_AE), Bulgarian (bg_BG), Czech (cz_CZ), Filipino (fil-PH), English (en_XX), German (de_DE), Spanish (es_ES), French (fr_FR), Hebrew (he_IL), Indonesian (id-ID), Italian (it_IT), Japanese (ja_JP), Khmer (km-KH), Korean (ko_KR), Lao language ( lo-LA), Myanmar (my-MM), NepaliPolish (ne-NP), (pl_PL), Portuguese (pt_BR), Romanian (ro_RO), Russian (ru_RU), Thai (th_TH), Turkish (tr_TR), Vietnamese (vi_VN), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW). By default, the locale is determined by the user's IP
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.

◆ CheckUserAge()

void UXsollaLoginSubsystem::CheckUserAge (const FString & DateOfBirth,
const FOnCheckUserAgeSuccess & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Checks user age for a particular region. The age requirements depend on the region. Service determines the user location by the IP address. More about the use cases.

Parameters
DateOfBirthUser's birth date in the YYYY-MM-DD format.
SuccessCallbackCalled after successful check of the user age.
ErrorCallbackCalled after the request resulted with an error.

◆ CompleteAuthByEmail()

void UXsollaLoginSubsystem::CompleteAuthByEmail (const FString & Code,
const FString & OperationId,
const FString & Email,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Completes authentication after the user enters a one-time code or follows a link received in an email. More about the use cases.

Parameters
CodeConfirmation code.
OperationIdIdentifier of the confirmation code.
EmailUser email address.
SuccessCallbackCalled after successful email authentication.
ErrorCallbackCalled after the request resulted with an error.

◆ CompleteAuthByPhoneNumber()

void UXsollaLoginSubsystem::CompleteAuthByPhoneNumber (const FString & Code,
const FString & OperationId,
const FString & PhoneNumber,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Completes authentication after the user enters a one-time code or follows a link received by SMS. More about the use cases.

Parameters
CodeConfirmation code.
OperationIdIdentifier of the confirmation code.
PhoneNumberUser phone number.
SuccessCallbackCalled after successful phone number authentication.
ErrorCallbackCalled after the request resulted with an error.

◆ CreateAccountLinkingCode()

void UXsollaLoginSubsystem::CreateAccountLinkingCode (const FString & AuthToken,
const FOnCodeReceived & SuccessCallback,
const FOnError & ErrorCallback 
)

Creates the code for linking the platform account to the existing main account when the user logs in to the game via a gaming console. More about the use cases.

Parameters
AuthTokenUser authorization token.
SuccessCallbackСalled after successful account linking code creation. The new linking code will be received.
ErrorCallbackCalled after the request resulted with an error.

◆ DropLoginData()

void UXsollaLoginSubsystem::DropLoginData (const bool ClearCache = true)

Drops cache and cleans login data.

◆ ExchangeAuthenticationCodeToToken()

void UXsollaLoginSubsystem::ExchangeAuthenticationCodeToToken (const FString & AuthenticationCode,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Exchanges the user authentication code to a valid JWT. More about the use cases.

Parameters
AuthenticationCodeAccess code received from several other OAuth 2.0 requests (example: code from social network authentication).
SuccessCallbackCalled after successful exchanging. Contains exchanged token.
ErrorCallbackCalled after request resulted with an error.

◆ GetAuthConfirmationCode()

void UXsollaLoginSubsystem::GetAuthConfirmationCode (const FString & UserId,
const FString & OperationId,
const FOnAuthCodeSuccess & SuccessCallback,
const FOnAuthCodeTimeout & TimeoutCallback,
const FOnAuthError & ErrorCallback 
)

Returns confirmation code for completing authentication via email or phone number. User must follow the link provided via email/SMS to receive the code.

Parameters
UserIdIdentifier of the user (can be either email or phone number).
OperationIdIdentifier of the confirmation code.
SuccessCallbackCalled after receiving the confirmation code.
TimeoutCallbackCalled after request timeout.
ErrorCallbackCalled after the request resulted with an error.

◆ GetFriends()

void UXsollaLoginSubsystem::GetFriends (const FString & AuthToken,
const EXsollaFriendsType Type,
const EXsollaUsersSortCriteria SortBy,
const EXsollaUsersSortOrder SortOrder,
const FOnUserFriendsUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const FString & After,
const int Limit = 20 
)

Returns user friends data.

Parameters
AuthTokenUser authorization token.
TypeFriends type.
SortByCondition for sorting users (by name/by update).
SortOrderCondition for sorting users (ascending/descending).
SuccessCallbackCalled after user friends data was successfully received.
ErrorCallbackCalled after the request resulted with an error.
AfterParameter that is used for API pagination.
LimitMaximum number of friends that can be received at a time.

◆ GetLinkedSocialNetworks()

void UXsollaLoginSubsystem::GetLinkedSocialNetworks (const FString & AuthToken,
const FOnLinkedSocialNetworksUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns the list of linked social networks.

Parameters
AuthTokenUser authorization token.
SuccessCallbackCalled after the list of linked social networks was successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetLoginData()

FXsollaLoginData UXsollaLoginSubsystem::GetLoginData () const

Returns user login state data.

◆ GetSocialAuthenticationUrl()

void UXsollaLoginSubsystem::GetSocialAuthenticationUrl (const FString & ProviderName,
const FString & State,
const FOnSocialUrlReceived & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Returns URL for authentication via the specified social network in a browser. More about the use cases.

Parameters
ProviderNameName of a social network. Provider must be connected to Login in Publisher Account.
Can be amazon, apple, baidu, battlenet, discord, facebook, github, google, kakao, linkedin, mailru, microsoft, msn, naver, ok, paypal, psn, qq, reddit, steam, twitch, twitter, vimeo, vk, wechat, weibo, yahoo, yandex, youtube, or xbox.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.
SuccessCallbackCalled after URL for social authentication was successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetSocialAuthLinks()

void UXsollaLoginSubsystem::GetSocialAuthLinks (const FString & AuthToken,
const FString & Locale,
const FOnSocialAuthLinksUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns list of links for social authentication enabled in Publisher Account.

Parameters
AuthTokenUser authorization token.
LocaleRegion in the <language code>_<country code> format, where:
  • language code — language code in the ISO 639-1 format;
  • country code — country/region code in the ISO 3166-1 alpha-2 format.
    The list of the links will be sorted from most to least used social networks, according to the variable value.
SuccessCallbackCalled after list of links for social authentication was successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetSocialFriends()

void UXsollaLoginSubsystem::GetSocialFriends (const FString & AuthToken,
const FString & Platform,
const FOnUserSocialFriendsUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Offset = 0,
const int Limit = 500,
const bool FromThisGame = false 
)

Returns user friends data from a social provider.

Parameters
AuthTokenUser authorization token.
PlatformName of social provider. If empty, friends from all available social providers will be fetched.
SuccessCallbackCalled after user friends data was successfully received.
ErrorCallbackCalled after the request resulted with an error.
OffsetNumber of the element from which the list is generated.
LimitMaximum number of friends that can be received at a time.
FromThisGameFlag indicating whether social friends are from this game.

◆ GetUserAttributes()

void UXsollaLoginSubsystem::GetUserAttributes (const FString & AuthToken,
const FString & UserId,
const TArray< FString > & AttributeKeys,
const FOnUserAttributesUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns a list of particular user’s attributes with their values and descriptions. Returns only user-editable attributes. More about the use cases.

Parameters
AuthTokenUser authorization token.
UserIdIdentifier of a user whose public attributes should be requested. If not specified, the method returns attrubutes for the current user.
AttributeKeysList of attributes’ keys which you want to get. If not specified, the method returns all user’s attributes.
SuccessCallbackCalled after user attributes were successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetUserDetails()

void UXsollaLoginSubsystem::GetUserDetails (const FString & AuthToken,
const FOnUserDetailsUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns user details. More about the use cases.

Parameters
AuthTokenUser authorization token.
SuccessCallbackCalled after successful user details were successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetUserEmail()

void UXsollaLoginSubsystem::GetUserEmail (const FString & AuthToken,
const FOnUserDetailsParamUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns the user’s email. More about the use cases.

Parameters
AuthTokenUser authorization token.
SuccessCallbackCalled after user email was successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetUserPhoneNumber()

void UXsollaLoginSubsystem::GetUserPhoneNumber (const FString & AuthToken,
const FOnUserDetailsParamUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns user phone number that is used for two-factor authentication. More about the use cases.

Parameters
AuthTokenUser authorization token.
SuccessCallbackCalled after user phone number was successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetUserProfile()

void UXsollaLoginSubsystem::GetUserProfile (const FString & AuthToken,
const FString & UserID,
const FOnUserProfileReceived & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns specified user public profile information.

Parameters
AuthTokenUser authorization token.
UserIDUser identifier of public profile information to be received.
SuccessCallbackCalled after user profile data was successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetUserReadOnlyAttributes()

void UXsollaLoginSubsystem::GetUserReadOnlyAttributes (const FString & AuthToken,
const FString & UserId,
const TArray< FString > & AttributeKeys,
const FOnUserAttributesUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns list of user read-only attributes.

Parameters
AuthTokenUser authorization token.
UserIdIdentifier of a user whose attributes should be updated.
AttributeKeysList of attributes’ keys which you want to get. If not specified, the method returns all user’s attributes.
SuccessCallbackCalled after user attributes were successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetUsersDevices()

void UXsollaLoginSubsystem::GetUsersDevices (const FString & AuthToken,
const FOnUserDevicesUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns a list of devices linked to the current user account. More about the use cases.

Parameters
AuthTokenUser authorization token.
SuccessCallbackCalled after users devices data was successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ GetUsersFriends()

void UXsollaLoginSubsystem::GetUsersFriends (const FString & AuthToken,
const FString & Platform,
const FOnCodeReceived & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns friends on the server.

Parameters
AuthTokenUser authorization token.
PlatformName of the chosen social provider. If not specified, the method gets friends from all social providers.
SuccessCallbackCalled after user friends were successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ HandleOAuthTokenRequest()

void UXsollaLoginSubsystem::HandleOAuthTokenRequest (FHttpRequestPtr HttpRequest,
FHttpResponsePtr HttpResponse,
bool bSucceeded,
FOnAuthError & ErrorCallback,
FOnAuthUpdate & SuccessCallback 
)
protected

Processes the request for obtaining/refreshing token using OAuth 2.0.

◆ HandleRequestOAuthError()

void UXsollaLoginSubsystem::HandleRequestOAuthError (XsollaHttpRequestError ErrorData,
FOnAuthError ErrorCallback 
)
protected

Returns true if the error occurs.

◆ HandleUrlWithCodeRequest()

void UXsollaLoginSubsystem::HandleUrlWithCodeRequest (FHttpRequestPtr HttpRequest,
FHttpResponsePtr HttpResponse,
const bool bSucceeded,
FOnAuthUpdate SuccessCallback,
FOnAuthError ErrorCallback 
)
protected

Processes the request that returns URL with a code that can be exchanged to user token (OAuth 2.0).

◆ Initialize()

void UXsollaLoginSubsystem::Initialize (const FString & InProjectId,
const FString & InLoginId,
const FString & InClientId 
)

Initializes controller with provided Project ID and Login ID (use to override project settings).

Parameters
InProjectIdNew Project ID value from Publisher Account. It can be found in Publisher Account next to the name of your project.
InLoginIdNew Login ID value from Publisher Account. To get it, open Publisher Account, go to the Login > Dashboard section, and click Copy ID beside the name of the Login project.
InClientIdNew Client ID value from Publisher Account. It can be found in Publisher Account in the Login > your Login project > Security > OAuth 2.0 section.

◆ LaunchNativeSocialAuthentication()

void UXsollaLoginSubsystem::LaunchNativeSocialAuthentication (const FString & ProviderName,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthCancel & CancelCallback,
const FOnAuthError & ErrorCallback,
const bool bRememberMe = false,
const FString & State = TEXT("xsollatest") 
)

Opens the specified social network mobile app (if available) in order to authenticate the user.

Parameters
ProviderNameName of the social network connected to Login in Publisher Account. Can be amazon, apple, baidu, battlenet, discord,facebook, github, google, kakao, linkedin, mailru, microsoft, msn, naver, ok, paypal, psn, qq, reddit, steam, twitch, twitter, vimeo, vk, wechat, weibo, yahoo, yandex, youtube, or xbox.
SuccessCallbackCalled after successful user authentication. Authentication data including the JWT will be received.
CancelCallbackCalled after user authentication was canceled.
ErrorCallbackCalled after user authentication resulted with an error.
bRememberMeWhether the user agrees to save the authentication data. Default is false.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.

◆ LaunchSocialAuthentication()

void UXsollaLoginSubsystem::LaunchSocialAuthentication (UObject * WorldContextObject,
UUserWidget *& BrowserWidget,
const bool bRememberMe = false 
)

Opens social authentication URL in the browser. More about the use cases.

Parameters
WorldContextObjectThe world context.
BrowserWidgetWidget to show the social network authentication form. Can be set in the project settings.
bRememberMeWhether the user agrees to save the authentication data. false by default.

◆ LinkDeviceToAccount()

void UXsollaLoginSubsystem::LinkDeviceToAccount (const FString & AuthToken,
const FString & PlatformName,
const FString & DeviceName,
const FString & DeviceId,
const FOnRequestSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Links the specified device to the current user account. More about the use cases.

Parameters
AuthTokenUser authorization token.
PlatformNameName of the mobile platform. Can be android or ios.
DeviceNameManufacturer and model name of the device.
DeviceIdPlatform specific unique device ID.
For Android, it is an ANDROID_ID constant.
For iOS, it is an identifierForVendor property.
SuccessCallbackCalled after successful linking of the device.
ErrorCallbackCalled after the request resulted with an error.

◆ LinkEmailAndPassword()

void UXsollaLoginSubsystem::LinkEmailAndPassword (const FString & AuthToken,
const FString & Email,
const FString & Password,
const bool ReceiveNewsConsent,
const FString & Username,
const FOnLinkEmailAndPasswordSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Adds a username, email address, and password, that can be used for authentication, to the current account. More about the use cases.

Parameters
AuthTokenUser authorization token.
EmailUser email.
PasswordUser password.
ReceiveNewsConsentWhether the user gave consent to receive the newsletters.
UsernameUser's username.
SuccessCallbackCalled after successful email and password linking.
ErrorCallbackCalled after the request resulted with an error.

◆ LinkSocialNetworkToUserAccount()

void UXsollaLoginSubsystem::LinkSocialNetworkToUserAccount (const FString & AuthToken,
const FString & ProviderName,
const FOnSocialAccountLinkingHtmlReceived & SuccessCallback,
const FOnError & ErrorCallback 
)

Links a social network that can be used for authentication to the current account. More about the use cases.

Parameters
AuthTokenUser authorization token.
ProviderNameName of a social network. Provider must be connected to Login in Publisher Account.
Can be amazon, apple, baidu, battlenet, discord, facebook, github, google, instagram, kakao, linkedin, mailru, microsoft, msn, naver, ok, paradox, paypal, psn, qq, reddit, steam, twitch, twitter, vimeo, vk, wechat, weibo, yahoo, yandex, youtube, xbox, playstation.
SuccessCallbackCalled after the URL for social authentication was successfully received.
ErrorCallbackCalled after the request resulted with an error.

◆ LoadSavedData()

void UXsollaLoginSubsystem::LoadSavedData ()

Loads save game and extract data.

◆ LogoutUser()

void UXsollaLoginSubsystem::LogoutUser (const FString & AuthToken,
const EXsollaSessionType Sessions,
const FOnRequestSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Logs the user out and deletes the user session according to the value of the sessions parameter (OAuth 2.0 only).

Parameters
AuthTokenUser authorization token.
SessionsShows how the user is logged out and how the user session is deleted. Available strings: sso and all. Leave empty to use the default value (all).
SuccessCallbackCalled after successful user logout.
ErrorCallbackCalled after the request resulted with an error.

◆ ModifyFriends()

void UXsollaLoginSubsystem::ModifyFriends (const FString & AuthToken,
const EXsollaFriendAction Action,
const FString & UserID,
const FOnRequestSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Modifies relationships with the specified user.

Parameters
AuthTokenUser authorization token.
ActionType of action to be applied to a specified friend.
UserIDIdentifier of a user to change relationships with.
SuccessCallbackCalled after successful user friends data modification.
ErrorCallbackCalled after the request resulted with an error.

◆ ModifyUserAttributes()

void UXsollaLoginSubsystem::ModifyUserAttributes (const FString & AuthToken,
const TArray< FXsollaUserAttribute > & AttributesToModify,
const FOnRequestSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Updates the values of user attributes with the specified IDs. The method can be used to create attributes. Changes are made on the user data storage side (server side). More about the use cases.

Parameters
AuthTokenUser authorization token.
AttributesToModifyList of attributes of the specified game.
To add attribute which doesn't exist, set this attribute to the key parameter.
To update value of the attribute, specify its key parameter and set the new value. You can change several attributes at a time.
SuccessCallbackCalled after successful user attributes modification on the server side.
ErrorCallbackCalled after the request resulted with an error.

◆ ModifyUserDetails()

void UXsollaLoginSubsystem::ModifyUserDetails (const FString & AuthToken,
const FString & Birthday,
const FString & FirstName,
const FString & LastName,
const FString & Gender,
const FString & Nickname,
const FOnUserDetailsUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Updates the specified user’s information. Changes are made on the user data storage side. More about the use cases.

Parameters
AuthTokenUser authorization token.
BirthdayUser birth date in format YYYY-MM-DD. Can be changed only once.
FirstNameUser first name. Pass empty string to remove the current first name.
LastNameUser last name. Pass empty string to remove the current last name.
GenderUser gender (f - for female, m - for male).
NicknameUser nickname. Pass empty string to remove the current nickname.
SuccessCallbackCalled after successful user details modification.
ErrorCallbackCalled after the request resulted with an error.

◆ ModifyUserPhoneNumber()

void UXsollaLoginSubsystem::ModifyUserPhoneNumber (const FString & AuthToken,
const FString & PhoneNumber,
const FOnUserDetailsParamUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Changes the user’s phone number that is used for two-factor authentication. Changes are made on the user data storage side (server-side). More about the use cases.

Parameters
AuthTokenUser authorization token.
PhoneNumberNew user phone number.
SuccessCallbackCalled after user phone number was successfully modified.
ErrorCallbackCalled after the request resulted with an error.

◆ ModifyUserProfilePicture()

void UXsollaLoginSubsystem::ModifyUserProfilePicture (const FString & AuthToken,
UTexture2D *const Picture,
const FOnUserDetailsParamUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Changes the user’s avatar. Changes are made on the user data storage side (server side). More about the use cases.

Parameters
AuthTokenUser authorization token.
PictureNew user profile picture.
SuccessCallbackCalled after the user profile picture was successfully modified.
ErrorCallbackCalled after the request resulted with an error.

◆ RefreshToken()

void UXsollaLoginSubsystem::RefreshToken (const FString & RefreshToken,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Refreshes the token in case it is expired. Works only when OAuth 2.0 is enabled.

Parameters
RefreshTokenToken used to refresh the expired access token. Received when authorizing the user with username/password for the first time.
SuccessCallbackCalled after successful token refreshing. Refresh data including the JWT will be received.
ErrorCallbackCalled after request resulted with an error.

◆ RegisterUser()

void UXsollaLoginSubsystem::RegisterUser (const FString & Username,
const FString & Password,
const FString & Email,
const FString & State,
const FString & Locale,
const bool PersonalDataProcessingConsent,
const bool ReceiveNewsConsent,
const TMap< FString, FString > & AdditionalFields,
const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Creates a new user account in the application and sends a sign-up confirmation email to the specified email address. To complete registration, the user must follow the link from the email. More about the use cases.

Parameters
UsernameUsername.
PasswordPassword.
EmailEmail address.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.
LocaleDefines localization of the email the user receives.
The following languages are supported: Arabic (ar_AE), Bulgarian (bg_BG), Czech (cz_CZ), German (de_DE), Spanish (es_ES), French (fr_FR), Hebrew (he_IL), Italian (it_IT), Japanese (ja_JP), Korean (ko_KR), Polish (pl_PL), Portuguese (pt_BR), Romanian (ro_RO), Russian (ru_RU), Thai (th_TH), Turkish (tr_TR), Vietnamese (vi_VN), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Enlish (en_XX, default).
PersonalDataProcessingConsentWhether the user gave consent to processing of their personal data.
ReceiveNewsConsentWhether the user gave consent to receive the newsletters.
AdditionalFieldsParameters used for extended registration forms.
SuccessCallbackCalled after successful user registration. Account confirmation message will be sent to the specified email address.
ErrorCallbackCalled after the request resulted with an error.

◆ RemoveProfilePicture()

void UXsollaLoginSubsystem::RemoveProfilePicture (const FString & AuthToken,
const FOnRequestSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Deletes the user’s avatar. Changes are made on the user data storage side (server side). More about the use cases.

Parameters
AuthTokenUser authorization token.
SuccessCallbackCalled after user profile picture was successfully removed.
ErrorCallbackCalled after the request resulted with an error.

◆ RemoveUserAttributes()

void UXsollaLoginSubsystem::RemoveUserAttributes (const FString & AuthToken,
const TArray< FString > & AttributesToRemove,
const FOnRequestSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Removes user attributes with the specified IDs. Changes are made on the user data storage side (server side). More about the use cases.

Parameters
AuthTokenUser authorization token.
AttributesToRemoveList of attribute keys for removal.
SuccessCallbackCalled after successful user attributes removal on the server side.
ErrorCallbackCalled after the request resulted with an error.

◆ RemoveUserPhoneNumber()

void UXsollaLoginSubsystem::RemoveUserPhoneNumber (const FString & AuthToken,
const FString & PhoneNumber,
const FOnRequestSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Deletes the user’s phone number that is used for two-factor authentication. Changes are made on the user data storage side (server side). More about the use cases.

Parameters
AuthTokenUser authorization token.
PhoneNumberUser phone number for removal.
SuccessCallbackCalled after the user phone number was successfully removed.
ErrorCallbackCalled after the request resulted with an error.

◆ ResendAccountConfirmationEmail()

void UXsollaLoginSubsystem::ResendAccountConfirmationEmail (const FString & Username,
const FString & State,
const FString & Locale,
const FOnRequestSuccess & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Resends a sign-up confirmation email to the specified email address. To complete registration, the user must follow the link from the email. More about the use cases.

Parameters
UsernameUsername.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.
LocaleDefines localization of the email the user receives.
The following languages are supported: Arabic (ar_AE), Bulgarian (bg_BG), Czech (cz_CZ), German (de_DE), Spanish (es_ES), French (fr_FR), Hebrew (he_IL), Italian (it_IT), Japanese (ja_JP), Korean (ko_KR), Polish (pl_PL), Portuguese (pt_BR), Romanian (ro_RO), Russian (ru_RU), Thai (th_TH), Turkish (tr_TR), Vietnamese (vi_VN), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Enlish (en_XX, default).
SuccessCallbackCalled after successful sending of the request.
ErrorCallbackCalled after the request resulted with an error.

◆ ResetUserPassword()

void UXsollaLoginSubsystem::ResetUserPassword (const FString & User,
const FString & Locale,
const FOnRequestSuccess & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Resets the user’s current password and sends an email to change the password to the email address specified during sign-up. More about the use cases.

Parameters
UserUser identifier (name or email address depending on user data storage type).
LocaleDefines localization of the email the user receives.
The following languages are supported: Arabic (ar_AE), Bulgarian (bg_BG), Czech (cz_CZ), German (de_DE), Spanish (es_ES), French (fr_FR), Hebrew (he_IL), Italian (it_IT), Japanese (ja_JP), Korean (ko_KR), Polish (pl_PL), Portuguese (pt_BR), Romanian (ro_RO), Russian (ru_RU), Thai (th_TH), Turkish (tr_TR), Vietnamese (vi_VN), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Enlish (en_XX, default).
SuccessCallbackCalled after successful user password reset.
ErrorCallbackCalled after the request resulted with an error.

◆ SaveData()

void UXsollaLoginSubsystem::SaveData ()

Saves cached data or resets it if RememberMe is false.

◆ SearchUsersByNickname()

void UXsollaLoginSubsystem::SearchUsersByNickname (const FString & AuthToken,
const FString & Nickname,
const FOnUserSearchUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Offset = 0,
const int Limit = 100 
)

Searches for users with the specified nickname.

Parameters
AuthTokenUser authorization token.
NicknameUser nickname used as search criteria.
SuccessCallbackCalled after user search is successfully completed.
ErrorCallbackCalled after the request resulted with an error.
OffsetNumber of elements from which the list is generated.
LimitMaximum number of users that can be received at a time.

◆ SetLoginData()

void UXsollaLoginSubsystem::SetLoginData (const FXsollaLoginDataData,
const bool ClearCache = true 
)

Sets user login state data.

◆ SetToken()

void UXsollaLoginSubsystem::SetToken (const FString & Token)

Sets a new value of a token (used when the token is obtained via social network authentication, etc.).

Parameters
TokenUser authorization token.

◆ StartAuthByEmail()

void UXsollaLoginSubsystem::StartAuthByEmail (const FString & Email,
const FString & State,
const FOnStartAuthSuccess & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Starts user authentication and sends an email with a one-time code and a link to the specified email address (if login via magic link is configured for the Login project). More about the use cases.

Parameters
EmailUser email address.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.
SuccessCallbackCalled after successful email authentication start.
ErrorCallbackCalled after the request resulted with an error.

◆ StartAuthByPhoneNumber()

void UXsollaLoginSubsystem::StartAuthByPhoneNumber (const FString & PhoneNumber,
const FString & State,
const FOnStartAuthSuccess & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Starts user authentication and sends an SMS with a one-time code and a link to the specified phone number (if login via magic link is configured for the Login project). More about the use cases.

Parameters
PhoneNumberUser phone number.
StateValue used for additional user verification on backend. Must be at least 8 symbols long. xsollatest by default. Required for OAuth 2.0.
SuccessCallbackCalled after successful phone number authentication start.
ErrorCallbackCalled after the request resulted with an error.

◆ UnlinkDeviceFromAccount()

void UXsollaLoginSubsystem::UnlinkDeviceFromAccount (const FString & AuthToken,
const int64 DeviceId,
const FOnRequestSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Unlinks the specified device from the current user account. More about the use cases.

Parameters
AuthTokenUser authorization token.
DeviceIdPlatform specific unique device ID.
For Android, it is an ANDROID_ID constant.
For iOS, it is an identifierForVendor property.
SuccessCallbackCalled after successful unlinking of the device.
ErrorCallbackCalled after the request resulted with an error.

◆ UnlinkSocialNetworkFromUserAccount()

void UXsollaLoginSubsystem::UnlinkSocialNetworkFromUserAccount (const FString & AuthToken,
const FString & ProviderName,
const FOnRequestSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Unlinks a social network from the user account. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
ProviderNameName of a social network. Provider must be connected to Login in Publisher Account.
Can be amazon, apple, baidu, battlenet, discord, facebook, github, google, instagram, kakao, linkedin, mailru, microsoft, msn, naver, ok, paradox, paypal, psn, qq, reddit, steam, twitch, twitter, vimeo, vk, wechat, weibo, yahoo, yandex, youtube, xbox, playstation.
SuccessCallbackCalled after a social network account was successfully unlinked.
ErrorCallbackCalled after the request resulted with an error.

◆ UpdateAuthTokenData()

void UXsollaLoginSubsystem::UpdateAuthTokenData (const FString & AccessToken,
int ExpiresIn,
const FString & RefreshToken,
bool bRememberMe = true 
)

Updates user auth token data.

◆ ValidateToken()

void UXsollaLoginSubsystem::ValidateToken (const FOnAuthUpdate & SuccessCallback,
const FOnAuthError & ErrorCallback 
)

Internal request for token validation (called with each auth update automatically)

Parameters
SuccessCallbackCalled after successful token validation.
ErrorCallbackCalled after the request resulted with an error.

Member Data Documentation

◆ LoginData

FXsollaLoginData UXsollaLoginSubsystem::LoginData
protected

Keeps state of user login.


The documentation for this class was generated from the following file: