C
C#3y ago
İrşat

SameSite problem - google cookies

Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute I still get this warning even after I wrote this in program.cs.
builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(options =>
{
options.ExpireTimeSpan = TimeSpan.FromHours(4);
options.Cookie.SameSite = SameSiteMode.None;
options.Cookie.SecurePolicy = CookieSecurePolicy.Always;
})
.AddGoogle(GoogleDefaults.AuthenticationScheme, googleOptions =>
{
googleOptions.ClientId = configuration["Authentication:Google:ClientId"];
googleOptions.ClientSecret = configuration["Authentication:Google:ClientSecret"];
googleOptions.CorrelationCookie.SameSite = SameSiteMode.None;
googleOptions.CorrelationCookie.SecurePolicy = CookieSecurePolicy.Always;
});
builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(options =>
{
options.ExpireTimeSpan = TimeSpan.FromHours(4);
options.Cookie.SameSite = SameSiteMode.None;
options.Cookie.SecurePolicy = CookieSecurePolicy.Always;
})
.AddGoogle(GoogleDefaults.AuthenticationScheme, googleOptions =>
{
googleOptions.ClientId = configuration["Authentication:Google:ClientId"];
googleOptions.ClientSecret = configuration["Authentication:Google:ClientSecret"];
googleOptions.CorrelationCookie.SameSite = SameSiteMode.None;
googleOptions.CorrelationCookie.SecurePolicy = CookieSecurePolicy.Always;
});
3 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
İrşat
İrşatOP3y ago
İrşat
İrşatOP3y ago
I will be back in 30 minutes I am back
Want results from more Discord servers?
Add your server