requestPasswordChange method

Future<void> requestPasswordChange({
  1. required String email,
})

Requests a password change for a user.

The backend will send an email to email with a ticket that can be used to confirm the password change, via confirmPasswordChange.

Throws an ApiException if requesting the password change fails.

https://docs.nhost.io/auth/api-reference#request-to-change-password

Implementation

Future<void> requestPasswordChange({required String email}) async {
  await _apiClient.post('/change-password/request', data: {
    'email': email,
  });
}