Email Confirmation and refactor for snackbar

This commit is contained in:
Arseni
2026-01-27 14:42:52 +03:00
parent e5cd0c9433
commit be1d678c42
28 changed files with 958 additions and 173 deletions

View File

@@ -57,6 +57,16 @@ class AccountService {
await getPUTResponse(_objectType, 'password', ForgotPasswordRequest.build(login: email).toJson());
}
static Future<void> resendVerificationEmail(String email) async {
_logger.fine('Resending verification email');
await getPUTResponse(_objectType, 'email', {'login': email});
}
static Future<void> verifyEmail(String token) async {
_logger.fine('Verifying email');
await getGETResponse(_objectType, 'verify/$token');
}
static Future<void> resetPassword(String accountRef, String token, String newPassword) async {
_logger.fine('Resetting password for account: $accountRef');
await getPOSTResponse(_objectType, 'password/reset/$accountRef/$token', ResetPasswordRequest.build(password: newPassword).toJson());