Email confirmation page after SignUp
This commit is contained in:
@@ -191,6 +191,15 @@ class AccountProvider extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> resendVerificationEmail(String email) async {
|
||||
try {
|
||||
await AccountService.resendVerificationEmail(email);
|
||||
} catch (e) {
|
||||
_setResource(_resource.copyWith(error: toException(e)));
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> logout() async {
|
||||
_authState = AuthState.empty;
|
||||
_setResource(_resource.copyWith(isLoading: true, error: null));
|
||||
|
||||
@@ -57,6 +57,11 @@ 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> 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());
|
||||
|
||||
Reference in New Issue
Block a user