LoginWithGameCenter
Methods
public Task<LoginResult> LoginWithGameCenter(GameCenterCredentials credentials, CancellationToken cancellationToken = default)
Login to coherence Cloud using a Game Center account.
Parameters
| Type | Name | Description |
|---|---|---|
| GameCenterCredentials | credentials | The credentials GameKit returned. |
| CancellationToken | cancellationToken | Used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<LoginResult> | The status of the asynchronous login operation. |
Remarks
'Game Center Auth Enabled' must be ticked, and BundleId must be listed among the allowed bundle identifiers, in Project Settings on your Online Dashboard for this authentication method to be usable.
The credentials are the output of GameKit's fetchItems(forIdentityVerificationSignature:).
coherence never calls GameKit itself, so it cannot validate them; see
LoginWithGameCenter(GameCenterCredentials, CancellationToken) for the two mistakes that can't be detected.
Implementations that have no use for Game Center can leave this alone: the default implementation throws System.NotSupportedException, so adding this method does not break existing implementations of IAuthClient.
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | The implementation does not support Game Center. |