LoginWithNintendo
method in Coherence.Cloud.CoherenceCloud
Methods
public static LoginOperation LoginWithNintendo(string token, CancellationToken cancellationToken = default)
Login to coherence Cloud using a Nintendo Account.
Parameters
Type | Name | Description |
---|---|---|
string | token | Nintendo Account ID as a JSON Web Token with a link to the public certificate embedded. |
CancellationToken | cancellationToken | Used to cancel the operation. |
Returns
Type | Description |
---|---|
LoginOperation | The status of the asynchronous login operation. |
Remarks
'Nintendo 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 LoginWithNintendo : MonoBehaviour
{
public async Task<PlayerAccount> Login(string token)
{
PlayerAccount playerAccount = await CoherenceCloud.LoginWithNintendo(token);
Debug.Log($"Logged in as: {playerAccount}.");
return playerAccount;
}
}