Player Accounts
Log in to coherence Cloud
Player Accounts can be used to authenticate players, uniquely identify them across multiple devices, and give them access to coherence Cloud's services.
CoherenceCloud API
The CoherenceCloud API provides many ways to authenticate your players with coherence Cloud:
Login As Guest
You can use CoherenceCloud.LoginAsGuest to log in to coherence Cloud using a guest account that is automatically generated for you.
Guest IDs are stored locally on the device, so it is important to know that uninstalling the game will also wipe out the data for the guest account, and players will no longer be able to access it even if they install the game again.
Login With Password
You can use CoherenceCloud.LoginWithPassword to log in to the coherence Cloud using a username and password.
An autoSignup value of true can be passed to the method to automatically create a new coherence Cloud account with the provided username and password, if one does not exist already. The default value of autoSignup is false.
Login With Session Token
You can use CoherenceCloud.LoginWithSessionToken to log in to coherence Cloud using a session token acquired from a previously login operation.
This can be useful to avoid users from having to re-enter their username and password every time they want to log in.
Session tokens will expire after a certain period of time after the last login operation.
Login With Steam
You can use CoherenceCloud.LoginWithSteam to log in to the coherence Cloud using a Steam account.
To do so, you have to provide at least an authentication ticket for the Steam User that you want to log in as. You get it from the SteamUser.GetAuthTicketForWebApi.
If you passed an identity string to the SteamUser.GetAuthTicketForWebApi method, you should also pass that same identity to the CoherenceCloud.LoginWithSteam method.
Login With Epic Games
You can use CoherenceCloud.LoginWithEpicGames to log in to the coherence Cloud using an Epic Games account.
Login With PlayStation
You can use CoherenceCloud.LoginWithPlayStation to log in to the coherence Cloud using a PlayStation Network account.
Login With Xbox
You can use CoherenceCloud.LoginWithXbox to log in to the coherence Cloud using an Xbox account.
Login With Nintendo
You can use CoherenceCloud.LoginWithNintendo to log in to the coherence Cloud using a Nintendo Services account.
Login With JWT
You can use CoherenceCloud.LoginWithJwt to log in to the coherence Cloud using a custom JSON Web Token.
Login With One-Time Code
You can use CoherenceCloud.LoginWithOneTimeCode to log in to the coherence Cloud using a temporary code acquired from another device using PlayerAccount.GetOneTimeCode.
Linking
If you want to add multiple authentication methods to the same Player Account, you can do so by first logging in using any of of the authentication methods, and then linking the rest of the authentication methods using the Link methods on the PlayerAccount class.
The PlayerAccount class provides the following methods for linking authentication methods into an existing Player Account:
LinkGuest
LinkSteam
LinkEpicGames
LinkPlayStation
LinkXbox
LinkNintendo
LinkJwt
Unlinking
Each of the Link methods listed above also have a corresponding Unlink method in the PlayerAccount class that can be used to remove an authentication method from the Player Account.
If an authentication method is already linked with one Player Account, and you try to link it with another one, the operation will fail by default. If however you pass a force value of true to a Link method, then the authentication method will automatically be unlinked from any existing Player Accounts it's associated with.
Warning: If an authentication method is unlinked from a Player Account, and the Player Account has no other authentication methods set up, then access to that Player Account will be lost.
Account Information
Username and Password
You can change the username and (optionally) password of a Player Account using PlayerAccount.SetUsername.
If no password is provided, then the option to login with password will not be available. This might still be useful if the username is used for game purposes only and not as an authentication method.
You can remove the username and password from a Player Account using PlayerAccount.RemoveUsername.
If the Player Account has no other authentication methods set up besides the username and password, then RemoveUsername will fail by default. If however you pass a force value of true to the method, then the username and password will be removed regardless.
Warning: Access to a Player Account will be lost if the last authentication method is removed from it.
Display Name and Image
You can change the display name and image of a Player Account using PlayerAccount.SetDisplayInformation.
You can remove the display name and image from a Player Account using PlayerAccount.RemoveDisplayInformation.
Email
You can assign an email address to a Player Account using PlayerAccount.SetEmail.
You can remove an email address from a Player Account using PlayerAccount.RemoveEmail.
Player Account Id
A globally unique identifier gets generated for every player account that is created. This id can be accessed via PlayerAccount.Id.
The id can be useful for storing player-specific data in Cloud Storage.
Last updated
Was this helpful?

