refined auth.
This commit is contained in:
@@ -111,6 +111,8 @@ namespace CarCareTracker.Controllers
|
||||
existingUserConfig.UserPasswordHash = string.Empty;
|
||||
}
|
||||
System.IO.File.WriteAllText("userConfig.json", JsonSerializer.Serialize(existingUserConfig));
|
||||
//destroy any login cookies.
|
||||
Response.Cookies.Delete("ACCESS_TOKEN");
|
||||
return Json(true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if (result.isConfirmed) {
|
||||
$.post('/Login/CreateLoginCreds', { userName: result.value.username, password: result.value.password }, function (data) {
|
||||
if (data) {
|
||||
window.location.href = '/Home';
|
||||
window.location.href = '/Login';
|
||||
} else {
|
||||
errorToast("An error occurred, please try again later.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user