Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User registration support ? #4

Open
amizer12 opened this issue Sep 1, 2021 · 4 comments
Open

User registration support ? #4

amizer12 opened this issue Sep 1, 2021 · 4 comments

Comments

@amizer12
Copy link

amizer12 commented Sep 1, 2021

No description provided.

@amizer12 amizer12 changed the title User registration support . User registration support ? Sep 1, 2021
@amizer12
Copy link
Author

amizer12 commented Sep 1, 2021

Hi,
Does this client support user registration nad password reset ?

@vvlladd28
Copy link
Member

Hi @amizer12,
This client support resetPaswort:

var tbClient = ThingsboardClient('https://demo.thingsboard.io');
await tbClient.sendResetPasswordLink(String email, {RequestConfig? requestConfig});

Registration user:

await tbClient.getUserService().saveUser(User user,
      {bool sendActivationMail = false, RequestConfig? requestConfig});

@pdt590
Copy link

pdt590 commented Feb 1, 2023

Hi, Does this client support user registration nad password reset ?

@amizer12: do you have any ideal to do this? Solution from @vvlladd28 seems not correct.
I cannot find out how to register a new user with email and pass.

Thanks

@bymelihkara
Copy link

try {
if (await connect("[email protected]", "tenantpassword")) {
await tbClient
.getUserService()
.saveUser(User(username, Authority.TENANT_ADMIN),
sendActivationMail: false)
.then((value) {
tbClient.getUserService().activateUser(
value.getId()!.id.toString(), password,
requestConfig: RequestConfig(
ignoreErrors: false,
ignoreLoading: false,
resendRequest: false));
});
return true;
} else {
return false;
}
} catch (e) {
return false;
}
I created and activated the user like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants