public async Task <IActionResult> CreatePassword(CreatePasswordRequest createPassword) { if (!ModelState.IsValid) { return(RedirectToAction(nameof(Index))); } Result result = await _credentialsService.CreatePassword(createPassword); if (result.Failure) { SaveTempData(STATUS_ALERT_TEMP_DATA_KEY, StatusAlertViewExtension.Get(result)); } else { SaveTempData(STATUS_ALERT_TEMP_DATA_KEY, StatusAlertViewExtension.Get("Password was created")); } return(RedirectToAction(nameof(Index))); }