Last Updated on : 2024-06-12 10:22:48download
Type | Meaning |
---|---|
Brand owner account | Users cannot create this type of account. The account that you receive upon purchasing the OEM SaaS. It is associated with your OEM SaaS domain. |
Enterprise main account | The account that you create on your own. It has all privileges within the organization and can create or delete projects. |
Enterprise sub-account | The account that an enterprise main account creates in their SaaS. It is granted access to specific features. |
Creating a main account on the mobile app is not supported. Go to the Smart Commercial Lighting platform to create an account.
The account system is designed with the one-to-many model, with one account assigned to multiple merchants. In the commercial lighting scenario, the system is limited to the one-to-one relationship, with one account uniquely assigned to one merchant. There is no need to specify the merchant code for login, because the system can retrieve the unique merchant associated with the current account.
Supported login methods:
Log in with a third-party account: Implemented in tandem with the Commercial Lighting OpenAPI.
Authorization process
Scenarios
lighting.console.tuyacn.com?ticket=xxx
. For example, redirect users to the system website or an H5 page for device control.API description
void loginByTicket(String ticket, IThingUserResultCallback<User> listener);
Parameter description
Parameter | Description |
---|---|
ticket | The ticket obtained during the authorization process. |
Example
ThingOSUser.getUserInstance().loginByTicket(content, new IThingUserResultCallback<User>() {
@Override
public void onSuccess(User user) {
Log.e(TAG,"Login successful")
}
@Override
public void onError(String code, String error) {
Log.e(TAG,"Login failed:" + error)
}
});
Reset or recover the password if users forget it. The steps for both operations are identical. Permission is verified before the request for the list of merchants.
For more information, see Recover or Reset Password.
The SDK manages the storage and deletion of account information, freeing you from taking care of its security and synchronization.
After successful login, the SDK will store the account information in the cache. After users log out, the SDK will clear the cache. You can handle your business logic after a successful callback.
For more information, see Recover or Reset Password.
To delete an enterprise main account, submit a service ticket for manual review.
Currently, the merchant account system does not support binding an account with a phone number or email address.
After a successful login, the account name and role will be returned as the account properties. To get additional properties such as nickname and avatar, invoke the Get User Information method.
The Get User Information method can also be used to sync additional user information between apps.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback