Skip to main content
Version: 5.9.6

GuestLogin

public BackendReturnObject GuestLogin();
public BackendReturnObject GuestLogin(string etc);

Parameter

ValueTypeDescription
etcstring(Optional) Information you wish to save in addition

Description

BACKND SDK provides the guest login function utilizing the custom(ID/password) account function.

  • Guest login accounts can be changed into Google/Apple/Facebook federation account.
  • Guest login accounts can perform token login.
  • Guest accounts log in based on the locally stored account information.
  • When local data deletion, app re-installation, device change, or local data damage occurs, the user cannot attempt guest login using the given account.
  • Even if the locally saved account information is deleted, the user data stored in the server remains.
Caution
  • BACKND does not provide separate login methods for guest accounts that have been restricted due to the deletion of locally saved account information.
  • The console does not provide the function to change ID/password of the guest login account.
  • Services such as data restoration and data transfer are not provided for guest accounts.
  • In case of local data deletion, app re-installation, device change, or local data damage, please make sure to notify the user that access to the guest account will not be available.
  • When email information is registered in the guest account, you can send a password initialization mail. With this email, password initialization will be available. However, if the password is initialized, the password of the guest account in SDK and the password of the actual account will differ.
    In this case, the user may log in only via a custom login.

Guest login

When the guest login method is called, the existence of guest account information stored locally in the device is checked.
The way of handling the method varies depending on whether the system has guest account information or not.

  • The ID of a guest account is generated in the format of guest-0514db55-6bd3-46f3-a4dd-0cc5a57ddf53.
    • guest- is a value that indicates that the account is a guest.
    • The suffix string is a UUID value that is not duplicated.
  • A guest account is regarded as a custom sign-up account. In BACKND Console, the type of sign-up is also displayed as customSignUp.

When guest account information exists in the device

A custom login is performed using the stored guest account.

When guest account information does not exist in the device

A custom sign-up is performed by creating an ID that does not match with another user.
When the sign-up succeeds, guest account information is stored in the device locally using BACKND file system function.

Example

Synchronous

BackendReturnObject bro = Backend.BMember.GuestLogin("Logged in using guest login");
if(bro.IsSuccess())
{
Debug.Log("Guest login successful");
}

Asynchronous

Backend.BMember.GuestLogin("Logged in using guest login", callback => {
if(callback.IsSuccess())
{
Debug.Log("Guest login successful");
}
});

SendQueue

SendQueue.Enqueue(Backend.BMemeber.GuestLogin, "Logged in using guest login", callback => {
if(callback.IsSuccess())
{
Debug.Log("Guest login successful");
}
});

Return cases

Success cases

When the guest sign-up is successful
statusCode : 201
errorCode : Success

When the guest login is successful
statusCode : 200
errorCode : Success

Error cases

When the device information is 'null'
statusCode : 400
errorCode : UndefinedParameterException

When the ID does not exist(when local data has been tampered)
statusCode : 401
errorCode : BadUnauthorizedException

When a guest login was attempted after changing the guest account to a federation account
statusCode : 401
errorCode : BadUnauthorizedException

When the user is blocked
statusCode : 403
errorCode : Reason for blocking entered in the console

When the device is blocked
statusCode : 403
errorCode : ForbiddenException

When withdrawal is in progress(after calling the WithdrawAccount method)
statusCode : 410
errorCode : GoneResourceException