Example #1
0
        public async Task <IActionResult> SendVerificationEmail()
        {
            var userId = HttpContext.User.Identity.Name;
            var user   = await _accessManager.GetUser(userId);

            if (user == null)
            {
                NotifyError("user", $"Unable to load user.");
                return(ResponseBadRequest());
            }

            var emailToken = await _accessManager.GenerateEmailConfirmationToken(user);

            return(Response(new
            {
                Code = HttpUtility.UrlEncode(emailToken)
            }));
        }