Update adds SameSite, Secure and httpOnly SetCookie Settings

This commit is contained in:
Cody 2024-10-05 13:17:31 -07:00 committed by GitHub
parent f9fbe5adc2
commit b65f165dcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,13 +16,13 @@ namespace Oqtane.UI
_jsRuntime = jsRuntime; _jsRuntime = jsRuntime;
} }
public Task SetCookie(string name, string value, int days) public Task SetCookie(string name, string value, int days, bool secure, bool httpOnly, string sameSite)
{ {
try try
{ {
_jsRuntime.InvokeVoidAsync( _jsRuntime.InvokeVoidAsync(
"Oqtane.Interop.setCookie", "Oqtane.Interop.setCookie",
name, value, days); name, value, days, secure, httpOnly, sameSite);
return Task.CompletedTask; return Task.CompletedTask;
} }
catch catch