using System; namespace Unity.Services.Authentication { /// /// AuthenticationError lists the error codes to expect from AuthenticationException and failed events. /// public static class AuthenticationError { /// /// This is a client error that is returned when the user is not in the right state. /// For example, calling SignOut when the user is already signed out will result in this error. /// public const string ClientInvalidUserState = "CLIENT_INVALID_USER_STATE"; /// /// This is a client error that is returned when trying to sign-in with session token while there is no cached /// session token. /// public const string ClientNoActiveSession = "CLIENT_NO_ACTIVE_SESSION"; /// /// The error returned when auth code parameter is not found in the authorize response. /// public const string AuthCodeNotFound = "AUTH_CODE_NOT_FOUND"; /// /// The error returned when the access token returned by server is invalid. /// public const string InvalidAccessToken = "INVALID_ACCESS_TOKEN"; /// /// The error returned when the entity with the same key already exists. /// It happens when a user tries to link a social account while the social account is already linked with another user. /// public const string EntityExists = "ENTITY_EXISTS"; /// /// The error returned when the parameter is missing or not in the right format. /// public const string InvalidParameters = "INVALID_PARAMETERS"; /// /// The error returned when the permission is denied using the token provided. /// public const string PermissionDenied = "PERMISSION_DENIED"; /// /// This is a network error when calling APIs. /// public const string NetworkError = "NETWORK_ERROR"; /// /// This is an unknown error. It happens when there is an unexpected server response. /// public const string UnknownError = "UNKNOWN_ERROR"; } }