Change Password
Change Password
You can change password of the user by calling the changePassword
method.
- Javascript
- Dart
let newPassword = "Altogic123";
let oldPassword = "12345%";
// Change the oldPassword of the user with the newPassword
const result = await altogic.auth.changePassword(newPassword, oldPassword);
final newPassword = "Altogic123";
final oldPassword = "12345%";
// Change the oldPassword of the user with the newPassword
final result = await altogic.auth.changePassword(newPassword, oldPassword);
Parameters
Here you can find parameters for the changePassword
method.
# | Name | Data type | Required | Description |
---|---|---|---|---|
1 | newPassword | String | Yes | The new password of the user. Password can be at least 6 char. |
2 | oldPassword | String | Yes | The old password of the user. |
note
An active user session is required (e.g., user needs to be logged in) to call this method.