public async Task <User> CreateUser(string email, string password, CancellationToken cancellationToken) { var hash = _passwordHasher.HashPassword(password); var confirmationCode = _confirmationCodeProvider.Generate(email); await _confirmationCodeSender.SendConfirmationCode(email, confirmationCode, cancellationToken); return(new User(Guid.NewGuid(), email, hash)); }
public void ResendConfirmationCode(User user) { var confirmationCode = _confirmationCodeProvider.Generate(user.Email, user.Id); user.ResendConfirmationCode(confirmationCode); }