Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

142
Visualizações
Chrome is blocking cookies in private mode for sameSite=none and Secure = CookieSecurePolicy.Always

I'm using identity server 4 and I have set cookiePolicy like:

in startup.cs

var cookiePolicyOptions = new CookiePolicyOptions
        {
            MinimumSameSitePolicy = Microsoft.AspNetCore.Http.SameSiteMode.None,
            HttpOnly = Microsoft.AspNetCore.CookiePolicy.HttpOnlyPolicy.None,
            Secure = CookieSecurePolicy.Always,
            
        };

and next:

app.UseCookiePolicy(cookiePolicyOptions);

I have also react application to authorize User in ID4. I am using Implicit Flow. When User is in normal mode everything's ok.

But when User is using private mode then the sign in window is not appear. sign in window

When in Google Chrome settings, Block thirty part cookies is set to Allow in private mode then everything is OK.

In case when application is running on localhost without https there is ok in both mode. The problem starts when application is on server with Https certificate.

I found a lot of information but still don't know if I Can do something to allow to set cookies in private mode during authorization?

Let me know if I should provide more information ;)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

My problem was that I set sameSite=none

It's mean that my IdentityServer has different domain name than my web client.

I have changed to sameSite=Lax -it's mean that Identity and WebClient has the same domain name- but I needed to change also on my IIS binding to the same domain name for Identity Server on port: 8443 Site and Web client site. (before that two domain names was different)

In this case chrome is not blocking cookies as thirty part cookie and allow set idsrv.external cookie in browser in incognito mode also.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda