Exemplo n.º 1
0
        public async Task <IActionResult> ConfirmEmail(string id, string code)
        {
            if (id == null || code == null)
            {
                return(BadRequest(new { message = "Missing Code or Id" }));
            }
            var decodedCode = HttpUtility.HtmlDecode(code);

            var result = await _userEngine.ConfirmEmail(id, decodedCode);

            if (!result.Succeeded)
            {
                return(BadRequest(new { message = result.StatusMessage }));
            }

            return(Ok());
        }
        public async Task <IActionResult> ConfirmEmail(string userId, string code)
        {
            var signInResult = await _userEngine.ConfirmEmail(userId, code);

            return(Json(signInResult));
        }