UXsollaLoginSubsystem Class Reference
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
Username Username or email. Password Password. SuccessCallback Called after successful user authentication. Authentication data including the JWT will be received. ErrorCallback Called after the request resulted with an error. bRememberMe Whether 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
DeviceName Manufacturer and model name of the device. DeviceId Platform specific unique device ID.
For Android, it is an ANDROID_ID constant.
For iOS, it is an identifierForVendor property.State Value used for additional user verification on backend. Must be at least 8 symbols long. xsollatest
by default. Required for OAuth 2.0.SuccessCallback Called after successful user authentication via the device ID. ErrorCallback Called 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
ProviderName Name 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
, orxbox
.SuccessCallback Called after successful user authentication. Authentication data including the JWT will be received. CancelCallback Called after user authentication was canceled. ErrorCallback Called after user authentication resulted with an error. bRememberMe Whether the user agrees to save the authentication data. Default is false
.State Value 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
ProviderName Platform on which the session ticket was obtained. Can be steam
,xbox
, orepicgames
.SessionTicket Session ticket received from the platform. Code Code received from the platform. AppId Platform application identifier. State Value used for additional user verification on backend. Must be at least 8 symbols long. xsollatest
by default. Required for OAuth 2.0.SuccessCallback Called after successful user authentication with a platform session ticket. Authentication data including a JWT will be received. ErrorCallback Called 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
AuthToken Access token received from a social network. AuthTokenSecret Parameter oauth_token_secret
received from the authorization request. Required for Twitter only.OpenId Parameter openid
received from the social network. Required for WeChat only.ProviderName Name of the social network connected to Login in Publisher Account. Can be facebook
,google
,linkedin
,twitter
,discord
,naver
,baidu
,wechat
, orqq_mobile
.State Value used for additional user verification on backend. Must be at least 8 symbols long. xsollatest
by default. Required for OAuth 2.0.SuccessCallback Called after successful user authentication on the specified platform. ErrorCallback Called 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
WorldContextObject The world context. BrowserWidget Widget that shows the social network authentication form. Can be set in the project settings. SuccessCallback Called after successful user authentication. Authentication data including the JWT will be received. CancelCallback Called after user authentication was canceled. ErrorCallback Called after user authentication resulted with an error. bRememberMe Whether 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 State Value 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
DateOfBirth User's birth date in the YYYY-MM-DD
format.SuccessCallback Called after successful check of the user age. ErrorCallback Called 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
Code Confirmation code. OperationId Identifier of the confirmation code. Email User email address. SuccessCallback Called after successful email authentication. ErrorCallback Called 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
Code Confirmation code. OperationId Identifier of the confirmation code. PhoneNumber User phone number. SuccessCallback Called after successful phone number authentication. ErrorCallback Called 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
AuthToken User authorization token. SuccessCallback Сalled after successful account linking code creation. The new linking code will be received. ErrorCallback Called 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
AuthenticationCode Access code received from several other OAuth 2.0 requests (example: code from social network authentication). SuccessCallback Called after successful exchanging. Contains exchanged token. ErrorCallback Called 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
UserId Identifier of the user (can be either email or phone number). OperationId Identifier of the confirmation code. SuccessCallback Called after receiving the confirmation code. TimeoutCallback Called after request timeout. ErrorCallback Called 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
AuthToken User authorization token. Type Friends type. SortBy Condition for sorting users (by name/by update). SortOrder Condition for sorting users (ascending/descending). SuccessCallback Called after user friends data was successfully received. ErrorCallback Called after the request resulted with an error. After Parameter that is used for API pagination. Limit Maximum 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
AuthToken User authorization token. SuccessCallback Called after the list of linked social networks was successfully received. ErrorCallback Called 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
ProviderName Name of a social network. Provider must be connected to Login in Publisher Account.
Can beamazon
,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
, orxbox
.State Value used for additional user verification on backend. Must be at least 8 symbols long. xsollatest
by default. Required for OAuth 2.0.SuccessCallback Called after URL for social authentication was successfully received. ErrorCallback Called 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
AuthToken User authorization token. Locale Region 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.
SuccessCallback Called after list of links for social authentication was successfully received. ErrorCallback Called 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
AuthToken User authorization token. Platform Name of social provider. If empty, friends from all available social providers will be fetched. SuccessCallback Called after user friends data was successfully received. ErrorCallback Called after the request resulted with an error. Offset Number of the element from which the list is generated. Limit Maximum number of friends that can be received at a time. FromThisGame Flag 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
AuthToken User authorization token. UserId Identifier of a user whose public attributes should be requested. If not specified, the method returns attrubutes for the current user. AttributeKeys List of attributes’ keys which you want to get. If not specified, the method returns all user’s attributes. SuccessCallback Called after user attributes were successfully received. ErrorCallback Called 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
AuthToken User authorization token. SuccessCallback Called after successful user details were successfully received. ErrorCallback Called 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
AuthToken User authorization token. SuccessCallback Called after user email was successfully received. ErrorCallback Called 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
AuthToken User authorization token. SuccessCallback Called after user phone number was successfully received. ErrorCallback Called 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
AuthToken User authorization token. UserID User identifier of public profile information to be received. SuccessCallback Called after user profile data was successfully received. ErrorCallback Called 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
AuthToken User authorization token. UserId Identifier of a user whose attributes should be updated. AttributeKeys List of attributes’ keys which you want to get. If not specified, the method returns all user’s attributes. SuccessCallback Called after user attributes were successfully received. ErrorCallback Called 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
AuthToken User authorization token. SuccessCallback Called after users devices data was successfully received. ErrorCallback Called 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
AuthToken User authorization token. Platform Name of the chosen social provider. If not specified, the method gets friends from all social providers. SuccessCallback Called after user friends were successfully received. ErrorCallback Called after the request resulted with an error.
◆ HandleOAuthTokenRequest()
| protected |
Processes the request for obtaining/refreshing token using OAuth 2.0.
◆ HandleRequestOAuthError()
| protected |
Returns true if the error occurs.
◆ HandleUrlWithCodeRequest()
| 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
InProjectId New Project ID value from Publisher Account. It can be found in Publisher Account next to the name of your project. InLoginId New 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. InClientId New 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
ProviderName Name 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
, orxbox
.SuccessCallback Called after successful user authentication. Authentication data including the JWT will be received. CancelCallback Called after user authentication was canceled. ErrorCallback Called after user authentication resulted with an error. bRememberMe Whether the user agrees to save the authentication data. Default is false
.State Value 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
WorldContextObject The world context. BrowserWidget Widget to show the social network authentication form. Can be set in the project settings. bRememberMe Whether 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
AuthToken User authorization token. PlatformName Name of the mobile platform. Can be android
orios
.DeviceName Manufacturer and model name of the device. DeviceId Platform specific unique device ID.
For Android, it is an ANDROID_ID constant.
For iOS, it is an identifierForVendor property.SuccessCallback Called after successful linking of the device. ErrorCallback Called 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
AuthToken User authorization token. Email User email. Password User password. ReceiveNewsConsent Whether the user gave consent to receive the newsletters. Username User's username. SuccessCallback Called after successful email and password linking. ErrorCallback Called 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
AuthToken User authorization token. ProviderName Name of a social network. Provider must be connected to Login in Publisher Account.
Can beamazon
,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
.SuccessCallback Called after the URL for social authentication was successfully received. ErrorCallback Called 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
AuthToken User authorization token. Sessions Shows how the user is logged out and how the user session is deleted. Available strings: sso
andall
. Leave empty to use the default value (all).SuccessCallback Called after successful user logout. ErrorCallback Called 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
AuthToken User authorization token. Action Type of action to be applied to a specified friend. UserID Identifier of a user to change relationships with. SuccessCallback Called after successful user friends data modification. ErrorCallback Called 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
AuthToken User authorization token. AttributesToModify List of attributes of the specified game.
To add attribute which doesn't exist, set this attribute to thekey
parameter.
To update value of the attribute, specify itskey
parameter and set the newvalue
. You can change several attributes at a time.SuccessCallback Called after successful user attributes modification on the server side. ErrorCallback Called 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
AuthToken User authorization token. Birthday User birth date in format YYYY-MM-DD
. Can be changed only once.FirstName User first name. Pass empty string to remove the current first name. LastName User last name. Pass empty string to remove the current last name. Gender User gender ( f
- for female,m
- for male).Nickname User nickname. Pass empty string to remove the current nickname. SuccessCallback Called after successful user details modification. ErrorCallback Called 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
AuthToken User authorization token. PhoneNumber New user phone number. SuccessCallback Called after user phone number was successfully modified. ErrorCallback Called 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
AuthToken User authorization token. Picture New user profile picture. SuccessCallback Called after the user profile picture was successfully modified. ErrorCallback Called 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
RefreshToken Token used to refresh the expired access token. Received when authorizing the user with username/password for the first time. SuccessCallback Called after successful token refreshing. Refresh data including the JWT will be received. ErrorCallback Called 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
Username Username. Password Password. Email Email address. State Value used for additional user verification on backend. Must be at least 8 symbols long. xsollatest
by default. Required for OAuth 2.0.Locale Defines 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).PersonalDataProcessingConsent Whether the user gave consent to processing of their personal data. ReceiveNewsConsent Whether the user gave consent to receive the newsletters. AdditionalFields Parameters used for extended registration forms. SuccessCallback Called after successful user registration. Account confirmation message will be sent to the specified email address. ErrorCallback Called 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
AuthToken User authorization token. SuccessCallback Called after user profile picture was successfully removed. ErrorCallback Called 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
AuthToken User authorization token. AttributesToRemove List of attribute keys for removal. SuccessCallback Called after successful user attributes removal on the server side. ErrorCallback Called 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
AuthToken User authorization token. PhoneNumber User phone number for removal. SuccessCallback Called after the user phone number was successfully removed. ErrorCallback Called 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
Username Username. State Value used for additional user verification on backend. Must be at least 8 symbols long. xsollatest
by default. Required for OAuth 2.0.Locale Defines 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).SuccessCallback Called after successful sending of the request. ErrorCallback Called 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
User User identifier (name or email address depending on user data storage type). Locale Defines 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).SuccessCallback Called after successful user password reset. ErrorCallback Called 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
AuthToken User authorization token. Nickname User nickname used as search criteria. SuccessCallback Called after user search is successfully completed. ErrorCallback Called after the request resulted with an error. Offset Number of elements from which the list is generated. Limit Maximum number of users that can be received at a time.
◆ SetLoginData()
void UXsollaLoginSubsystem::SetLoginData | ( | const FXsollaLoginData & | Data, |
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
Token User 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
Email User email address. State Value used for additional user verification on backend. Must be at least 8 symbols long. xsollatest
by default. Required for OAuth 2.0.SuccessCallback Called after successful email authentication start. ErrorCallback Called 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
PhoneNumber User phone number. State Value used for additional user verification on backend. Must be at least 8 symbols long. xsollatest
by default. Required for OAuth 2.0.SuccessCallback Called after successful phone number authentication start. ErrorCallback Called 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
AuthToken User authorization token. DeviceId Platform specific unique device ID.
For Android, it is an ANDROID_ID constant.
For iOS, it is an identifierForVendor property.SuccessCallback Called after successful unlinking of the device. ErrorCallback Called 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
AuthToken User authorization token obtained during authorization using Xsolla Login (more about authorization options). ProviderName Name of a social network. Provider must be connected to Login in Publisher Account.
Can beamazon
,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
.SuccessCallback Called after a social network account was successfully unlinked. ErrorCallback Called 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
SuccessCallback Called after successful token validation. ErrorCallback Called after the request resulted with an error.
Member Data Documentation
◆ LoginData
| protected |
Keeps state of user login.
The documentation for this class was generated from the following file:
- Source/XsollaLogin/Public/XsollaLoginSubsystem.h