Ejemplo n.º 1
0
        public async Task <ActionResult> ResetPasswordConfirmation(
            ResetPasswordConfirmationRequest request,
            CancellationToken ct)
        {
            var isTokenValid = await _passwordResetService.IsTokenValidAsync(request.TokenId, request.Code, ct);

            if (!isTokenValid)
            {
                return(BadRequest("Invalid code"));
            }

            var model = new ResetPasswordConfirmationViewModel(
                request.TokenId,
                request.Code,
                request.IsPasswordsNotEqual);

            return(View("~/OAuth/Views/SetNewPassword.cshtml", model));
        }