Skip to main content
Version: 5.9.6

Sign-up/Login

How to sign up

BACKND provides a total of 3 ways to sign-up for user management.

Sign-up typeValue used to authenticateDescription
Custom accountID/passwordAccount signed up by the user using the ID/password
Federation accountGoogle/Apple/Facebook's token informationAccount signed up using the token value provided by Google/Apple/Facebook
Guest account
(Custom account)
Guest account information stored in the deviceAccount signed up using the account information generated in the device

How to log in

BACKND provides 4 ways to log in.
If you sign up, the login process is performed at the same time.
accessToken and refreshToken are issued to all Custom, federation, and guest accounts upon their login.
The issued accessToken and refreshToken are stored in the device, which can be used to attempt token login.

Login typeValue used to authenticateDescription
Custom accountID / PasswordUser logs in manually using an ID/password
Federation accountGoogle/Apple/Facebook's token informationUser logs in using a token value provided by Google/Apple/Facebook
Guest account
(Custom Account)
Guest account information stored in the deviceUser logs in using account information generated in the device
Access token loginaccessToken and refreshToken information stored in the deviceUser logs in using access token information created when trying custom/federation/guest login

Variables provided upon successful login

Upon successful login, values are assigned to some of the BACKND SDK variables.
The variables are as follows:

ValueDescription
Backend.UserNickNameUser's nickname
Backend.UserInDateUser inDate
Backend.UIDUser's web coupon UID
var bro = Backend.BMember.CustomLogin("backendUser", "backendUser");

if(bro.IsSuccess()) {
Debug.Log("Login successful : " + bro);
Debug.Log($"User's nickname: " + Backend.UserNickName);
Debug.Log($"User inDate: " + Backend.UserInDate);
Debug.Log($"User UID(for coupon): " + Backend.UID);
}
else {
Debug.LogError("An error occurred while logging in.");
// Values are not assigned to Backend.UserNickname, Backend.UserInDate, and Backend.UID.
}

When attempting to log in via another device while logged in

For any communication, BACKND validates the BACKND Access Token that is issued upon login.

  • A single user can only have one valid Access Token.
  • If the user is logged in to another device, the validation of the previous Access Token will fail; as a result, the device that was previously logged in can no longer communicate with the server.
  • The device that was used for the new login connects to the server without any issues.

If the Access Token is invalid, the following BackendReturnObject is returned:

statusCode : 401  
errorCode : BadUnauthorizedException
<!-- message : bad accessToken, Invalid accessToken -->
statusCode : 401  
errorCode : BadUnauthorizedException
<!-- message : bad bad,accessToken,,Invalid accessToken, Invalid bad, accessToken,, Invalid,accessToken -->