Esempio n. 1
0
        public IActionResult ConfirmEmail(string token)
        {
            bool emailConfirmation = _emailService.CheckEmailToken(token);

            if (emailConfirmation)
            {
                JwtSecurityToken tokenJwt = _emailService.DecodeJwtToken(token);
                string           email    = tokenJwt.Payload.FirstOrDefault(x => x.Key == "email").Value.ToString();
                _userService.ActivateUser(email);
            }
            return(null);
        }