changePassword method
Changes the password of the logged in user.
Throws an NhostException
if changing passwords fails.
Implementation
@override
Future<void> changePassword({
required String newPassword,
String? ticket,
}) async {
await _apiClient.post(
'/user/password',
jsonBody: {
'newPassword': newPassword,
if (ticket != null) 'ticket': ticket
},
headers: _session.authenticationHeaders,
);
}