Skip to main content
Version: 6.0.0

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
Backnd.UserNickNameUser's nickname
Backnd.PlayerInDateUser inDate
Backnd.UIDUser's web coupon UID
var bro = Backnd.Player.CustomSignIn("backendUser", "backendUser");

if(bro.IsSuccess()) {
Debug.Log("Login successful : " + bro);
Debug.Log($"User's nickname: " + Backnd.UserNickName);
Debug.Log($"User inDate: " + Backnd.PlayerInDate);
Debug.Log($"User UID(for coupon): " + Backnd.UID);
}
else {
Debug.LogError("An error occurred while logging in.");
// Values are not assigned to Backnd.UserNickname, Backnd.PlayerInDate, and Backnd.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 BackndReturnObject 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 -->