Login secure problem

This commit is contained in:
2026-01-28 13:46:16 +01:00
parent 4c7e24c478
commit ea9673c29b
2 changed files with 3 additions and 5 deletions
@@ -8,9 +8,6 @@
Layout = null; Layout = null;
ViewData["Title"] = "Bejelentkezés"; ViewData["Title"] = "Bejelentkezés";
} }
<!DOCTYPE html> <!DOCTYPE html>
<html lang="hu"> <html lang="hu">
<head> <head>
@@ -188,6 +185,7 @@
if (result.success) { if (result.success) {
window.location.href = `/Index`; window.location.href = `/Index`;
} else { } else {
console.log(result);
$('#errorMessageContainer').text('Hibás felhasználónév vagy jelszó!').show(); $('#errorMessageContainer').text('Hibás felhasználónév vagy jelszó!').show();
// $('#Login2F1Btn, #Login2F2Btn') // $('#Login2F1Btn, #Login2F2Btn')
// .prop('disabled', false) // .prop('disabled', false)
@@ -55,8 +55,8 @@ namespace WorkFlowCheck.Web.Pages.Account
Response.Cookies.Append("AuthToken", token, new CookieOptions Response.Cookies.Append("AuthToken", token, new CookieOptions
{ {
HttpOnly = true, HttpOnly = true,
Secure = true, Secure = HttpContext.Request.IsHttps,
SameSite = SameSiteMode.Strict, SameSite = SameSiteMode.Lax,
Expires = DateTimeOffset.UtcNow.AddDays(1) Expires = DateTimeOffset.UtcNow.AddDays(1)
}); });