public async Task <IActionResult> OnGetAsync(string token)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(token))
                {
                    return(Page());
                }


                var decryptToken = token.AesDecrypt(AuthConst.SecretKey);

                string userId = decryptToken.Split(", ")[0];
                string _token = decryptToken.Split(", ")[1];

                var result = await _userApplication.EmailConfirmationAsync(userId, _token);

                return(Page());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> OnGetAsync(string Token)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(Token))
                {
                    return(Page());
                }

                string DecreptedToken = Token.AesDecrypt(AuthConst.SecretKey);

                string _UserId = DecreptedToken.Split(", ")[0];
                string _Token  = DecreptedToken.Split(", ")[1];


                var Result = await _UserApplication.EmailConfirmationAsync(_UserId, _Token);

                if (Result.IsSucceeded)
                {
                    return(Page());
                }
                else
                {
                    return(Page());
                }
            }
            catch (Exception)
            {
                return(Page());
            }
        }