AltairCA.Blazor.WebAssembly.Cookie is a Cookie manager for blazor webassembly.
Install-Package AltairCA.Blazor.WebAssembly.Cookie
builder.Services.AddAltairCACookieService(options =>
{
options.DefaultExpire = TimeSpan.FromMinutes(15);
});
@inject IAltairCABlazorCookieUtil _cookieUtil;
await _cookieUtil.SetValueAsync("cookieName", "value");
await _cookieUtil.SetValueAsync("a", "a",path:"/",domain:"localhost",secure:true);
await _cookieUtil.SetValueAsync(key: "b", value: "a",span:TimeSpan.Zero);