Set SameSiteMode for cookies in authentication tests (#25281)
This commit is contained in:
parent
098be5f5ee
commit
e2dd2969b5
|
|
@ -3,6 +3,7 @@ using System.Linq;
|
|||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
|
@ -57,6 +58,11 @@ namespace Wasm.Authentication.Server
|
|||
app.UseWebAssemblyDebugging();
|
||||
}
|
||||
|
||||
app.UseCookiePolicy(new CookiePolicyOptions
|
||||
{
|
||||
MinimumSameSitePolicy = SameSiteMode.Lax
|
||||
});
|
||||
|
||||
app.UseBlazorFrameworkFiles();
|
||||
app.UseStaticFiles();
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,12 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.AspNetCore" />
|
||||
<Reference Include="Microsoft.AspNetCore.CookiePolicy" />
|
||||
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
|
||||
<Reference Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" />
|
||||
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
|
||||
<Reference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
|
||||
<Reference Include="Microsoft.AspNetCore.Authentication.Cookies" />
|
||||
<Reference Include="Microsoft.EntityFrameworkCore.Design" />
|
||||
<Reference Include="Microsoft.AspNetCore.Identity.UI" />
|
||||
<Reference Include="Microsoft.EntityFrameworkCore.Relational" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue