Example #1
0
        public async Task <bool> SendEmailVerificationAsync(string accessToken, EmailVerificationData emailVerificationData)
        {
            httpClient.SetBearerToken(accessToken);

            var response = await httpClient.PostAsJsonAsync(Controller + "SendEmailVerification", emailVerificationData);

            return(await response.CreateResponseAsync <bool>());
        }
Example #2
0
        public async Task <IHttpActionResult> SendEmailVerification(EmailVerificationData model)
        {
            var userId = userContext.UserId.ToString();
            var token  = await userManager.GenerateEmailConfirmationTokenAsync(userId);

            var email = await userManager.GetEmailAsync(userId);

            var emailModel = new { VerifyLink = GetEmailVerificationUrl(model.Url, token, userId) };

            var result = await emailService.SendEmail("VerifyEmailAddress", email, "Verify your email address", emailModel);

            return(Ok(result));
        }
        public async Task<IHttpActionResult> SendEmailVerification(EmailVerificationData model)
        {
            var userId = userContext.UserId.ToString();
            var token = await userManager.GenerateEmailConfirmationTokenAsync(userId);
            var email = await userManager.GetEmailAsync(userId);

            var emailModel = new { VerifyLink = GetEmailVerificationUrl(model.Url, token, userId) };

            var result = await emailService.SendEmail("VerifyEmailAddress", email, "Verify your email address", emailModel);

            return Ok(result);
        }
 public async Task<bool> SendEmailVerificationAsync(string accessToken, EmailVerificationData emailVerificationData)
 {
     httpClient.SetBearerToken(accessToken);
     var response = await httpClient.PostAsJsonAsync(Controller + "SendEmailVerification", emailVerificationData);
     return await response.CreateResponseAsync<bool>();
 }