LootLocker Unity SDK 8.0.0
Game backend SDK for Unity
Loading...
Searching...
No Matches
Remote Sessions

Detailed Description

Log in to a different platform than the one you are currently playing on.

Part of Unified Player Accounts (UPA). A player on one platform (e.g., Nintendo Switch) can authenticate as their account on another platform (e.g., Steam) without needing the target platform's native app. The flow uses an 8-digit code verified through https://auth.game.

See the LootLocker documentation.

Function Documentation

◆ CancelRemoteSessionProcess()

static void LootLocker.Requests.LootLockerSDKManager.CancelRemoteSessionProcess ( Guid  guid)
inlinestatic

Cancel an ongoing remote session process.

Parameters
guidThe guid of the remote session process that you want to cancel

◆ RefreshRemoteSession() [1/2]

static void LootLocker.Requests.LootLockerSDKManager.RefreshRemoteSession ( Action< LootLockerRefreshRemoteSessionResponse onComplete,
string  forPlayerWithUlid = null 
)
inlinestatic

Refresh a previous session signed in remotely.

A response code of 400 (Bad request) could mean that the refresh token has expired and you'll need to sign in again

Parameters
onCompleteonComplete Action for handling the response
forPlayerWithUlidOptional : Execute the request for the specified player. If not supplied, the default player will be used.

◆ RefreshRemoteSession() [2/2]

static void LootLocker.Requests.LootLockerSDKManager.RefreshRemoteSession ( string  refreshToken,
Action< LootLockerRefreshRemoteSessionResponse onComplete,
string  forPlayerWithUlid = null 
)
inlinestatic

Refresh a previous session signed in remotely.

If you do not want to manually handle the refresh token we recommend using the RefreshRemoteSession(Action<LootLockerRemoteSessionResponse> onComplete, string forPlayerWithUlid) method. A response code of 400 (Bad request) could mean that the refresh token has expired and you'll need to sign in again

Parameters
refreshTokenToken received in response from StartRemoteSession request
onCompleteonComplete Action for handling the response
forPlayerWithUlidOptional : Execute the request for the specified player. If not supplied, the default player will be used.

◆ StartRemoteSession()

static Guid LootLocker.Requests.LootLockerSDKManager.StartRemoteSession ( Action< LootLockerLeaseRemoteSessionResponse remoteSessionLeaseInformation,
Action< LootLockerRemoteSessionStatusPollingResponse remoteSessionLeaseStatusUpdate,
Action< LootLockerStartRemoteSessionResponse onComplete,
float  pollingIntervalSeconds = 1::0f,
float  timeOutAfterMinutes = 5::0f,
LootLockerAccountProvider  provider = LootLockerAccountProvider::guest 
)
inlinestatic

Start a remote session If you want to let your local user sign in using another device then you use this method.

First you will get the lease information needed to allow a secondary device to authenticate. While the process is ongoing, the remoteSessionLeaseStatusUpdate action (if one is provided) will be invoked intermittently (about once a second) to update you on the status of the process. When the process has come to an end (whether successfully or not), the onComplete action will be invoked with the updated information.

Parameters
remoteSessionLeaseInformationWill be invoked once to provide the lease information that the secondary device can use to authenticate
remoteSessionLeaseStatusUpdateWill be invoked intermittently to update the status lease process
onCompleteInvoked when the remote session process has run to completion containing either a valid session or information on why the process failed
pollingIntervalSecondsOptional: How often to poll the status of the remote session process
timeOutAfterMinutesOptional: How long to allow the process to take in its entirety
providerOptional: Preloads the connection flow with which provider to use for sign-in, so the user does not have to select it manually. When set to any value other than guest, the provider is embedded in the redirect_url returned with the lease information.

◆ StartRemoteSessionForLinking()

static Guid LootLocker.Requests.LootLockerSDKManager.StartRemoteSessionForLinking ( string  forPlayerWithUlid,
Action< LootLockerLeaseRemoteSessionResponse remoteSessionLeaseInformation,
Action< LootLockerRemoteSessionStatusPollingResponse remoteSessionLeaseStatusUpdate,
Action< LootLockerStartRemoteSessionResponse onComplete,
float  pollingIntervalSeconds = 1::0f,
float  timeOutAfterMinutes = 5::0f,
LootLockerAccountProvider  provider = LootLockerAccountProvider::guest 
)
inlinestatic

Start a remote session for linking If you want to let your local user sign in using another device then you use this method.

First you will get the lease information needed to allow a secondary device to authenticate. While the process is ongoing, the remoteSessionLeaseStatusUpdate action (if one is provided) will be invoked intermittently (about once a second) to update you on the status of the process. When the process has come to an end (whether successfully or not), the onComplete action will be invoked with the updated information.

Parameters
forPlayerWithUlidExecute the request for the specified player (the player that you intend to link the remote account into)
remoteSessionLeaseInformationWill be invoked once to provide the lease information that the secondary device can use to authenticate
remoteSessionLeaseStatusUpdateWill be invoked intermittently to update the status lease process
onCompleteInvoked when the remote session process has run to completion containing either a valid session or information on why the process failed
pollingIntervalSecondsOptional: How often to poll the status of the remote session process
timeOutAfterMinutesOptional: How long to allow the process to take in its entirety
providerOptional: Preloads the connection flow with which provider to use for linking, so the user does not have to select it manually. When set to any value other than guest, the provider is embedded in the redirect_url returned with the lease information.

Functions

static Guid LootLocker.Requests.LootLockerSDKManager.StartRemoteSession (Action< LootLockerLeaseRemoteSessionResponse > remoteSessionLeaseInformation, Action< LootLockerRemoteSessionStatusPollingResponse > remoteSessionLeaseStatusUpdate, Action< LootLockerStartRemoteSessionResponse > onComplete, float pollingIntervalSeconds=1.0f, float timeOutAfterMinutes=5.0f, LootLockerAccountProvider provider=LootLockerAccountProvider.guest)
 Start a remote session If you want to let your local user sign in using another device then you use this method.
 
static Guid LootLocker.Requests.LootLockerSDKManager.StartRemoteSessionForLinking (string forPlayerWithUlid, Action< LootLockerLeaseRemoteSessionResponse > remoteSessionLeaseInformation, Action< LootLockerRemoteSessionStatusPollingResponse > remoteSessionLeaseStatusUpdate, Action< LootLockerStartRemoteSessionResponse > onComplete, float pollingIntervalSeconds=1.0f, float timeOutAfterMinutes=5.0f, LootLockerAccountProvider provider=LootLockerAccountProvider.guest)
 Start a remote session for linking If you want to let your local user sign in using another device then you use this method.
 
static void LootLocker.Requests.LootLockerSDKManager.CancelRemoteSessionProcess (Guid guid)
 Cancel an ongoing remote session process.
 
static void LootLocker.Requests.LootLockerSDKManager.RefreshRemoteSession (Action< LootLockerRefreshRemoteSessionResponse > onComplete, string forPlayerWithUlid=null)
 Refresh a previous session signed in remotely.
 
static void LootLocker.Requests.LootLockerSDKManager.RefreshRemoteSession (string refreshToken, Action< LootLockerRefreshRemoteSessionResponse > onComplete, string forPlayerWithUlid=null)
 Refresh a previous session signed in remotely.