Table of Contents

LegacyLoginData

struct in Coherence.Cloud

Represents locally cached data for the last player account that was logged in using the old login system.

Remarks

In coherence version 1.3.0 and older, coherence used to store some credentials information (username, session token and an auto-generated password when logging in as a guest) locally when a user logged in to coherence Cloud, and could use them to try to automatically log in, without the user needing to provide their credentials again.

In the current version, you need to store user credentials yourself, and pass them to the appropriate login methods in CoherenceCloud, if you want your users to be able to get logged in to coherence Cloud automatically without needing to provide credentials such as their username and password again every time. Storing the data locally can be done easily using Coherence.Prefs.Prefs.SetString(string, string).

You can pass SessionToken to LoginWithSessionToken(SessionToken, CancellationToken) to try to log in again as the same player account without needing to provide the username and password. This will only work if the session token has not expired.

You can clear all the cached legacy login data for the current project using Clear(string, string) once you no longer need it.

Fields
None

Result returned by Get(string, string) when no cached data is found for the project.

Properties
GuestPassword

Password that was automatically generated for the last player account that was logged in as a guest using the old login system.

SessionToken

Token uniquely identifying the last player account that was logged in using the old login system.

Username

Username that was last used to log in using the old login system.

Methods
Clear

Clear all locally cached data from the last player account that was logged in to the given project using the old login system in coherence 1.3.0 and older.

Cached data includes the Username, GuestPassword (if the last player account was logged in as a guest), and SessionToken for the player account).

ClearForProject

Clear all locally cached data for all guest accounts in a given Project that used the the old login system in coherence 1.3.0 and older.

Cached data includes the Username, GuestPassword (if the last player account was logged in as a guest), and SessionToken for the player account.

ID of the project. Can be retrieved via RuntimeSettings.Instance.ProjectID.
Get

Get locally cached data from the last player account that was logged in to the given project using the old login system in coherence 1.3.0 and older.

See Also
Get(string, string)
Clear(string, string)
LoginWithSessionToken(SessionToken, CancellationToken)
LoginWithPassword(string, string, bool, CancellationToken)