LoginWithSteam
method in Coherence.Cloud.CoherenceCloud
Methods
public static LoginOperation LoginWithSteam(string ticket, string identity = null, CancellationToken cancellationToken = default)
Login to coherence Cloud using a Steam account.
Parameters
Type | Name | Description |
---|---|---|
string | ticket | Steam ticket for the account. |
string | identity | (Optional) The identifier string that was passed as a parameter to the GetAuthTicketForWebApi method of the Steamworks Web API when the ticket was created. |
CancellationToken | cancellationToken | Used to cancel the operation. |
Returns
Type | Description |
---|---|
LoginOperation | The status of the asynchronous login operation. |
Remarks
'Steam Auth Enabled' must be ticked in Project Settings on your Online Dashboard for this authentication method to be usable.
Examples
using System.Threading.Tasks;
using Coherence.Cloud;
using UnityEngine;
class LoginWithSteam : MonoBehaviour
{
public async Task<PlayerAccount> Login(string ticket, string identity = null)
{
PlayerAccount playerAccount = await CoherenceCloud.LoginWithSteam(ticket, identity);
Debug.Log($"Logged in as: {playerAccount}.");
return playerAccount;
}
}