Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We couldn't log you in Your browser wouldn't accept our cookie. in firefox #2198

Closed
ayoubjamouhi opened this issue Dec 21, 2020 · 16 comments
Closed

Comments

@ayoubjamouhi
Copy link

I can't access to local folder of sanity .
Its showing this message.

We couldn't log you in

Your browser wouldn't accept our cookie.

@zanedev
Copy link

zanedev commented Dec 22, 2020

Check that you are allowing 3rd party cookies in your browser settings. If you are in private/incognito mode 3rd party cookies are off by default so you need to set the preferences in the browser to allow 3rd party cookies in private mode. Browser add-ons and virus protection can block 3rd party cookies also.

@ayoubjamouhi
Copy link
Author

I'm doing what you tell me but same problem

@JonathanSaudhof
Copy link

for me as well!

@saleebm
Copy link

saleebm commented Feb 1, 2021

Same issue, deployed to Sanity and using Firefox.

EDIT:
The issue is solved if you disable enhanced tracking protection.

disable enhanced tracking protection

@ayoubjamouhi
Copy link
Author

The problem still here

I'm using machine running running firefox developer edition

@javierarcheni
Copy link

I had the same problem. First, Be sure as pointed out by zanedev, no third party cookies are blocked by default (on chrome privacy->cookies->allow cookies) Check no ad-blocker running on domain as well. After unchecking block third party on settings, Studio was back. Firefox dev edition is blocking third party cookies by default.

@dryan
Copy link

dryan commented Sep 28, 2021

You really can't expect folx to turn off third-party cookie blocking. This has been the default for a while on all the big browsers. We're seeing this same issue in Chrome for some of our users when using ____.sanity.studio.

@VeVas
Copy link

VeVas commented Oct 4, 2021

I'm seeing this issue in all major browsers now, desktop and tablet/phone, Safari and Chrome.
+1 for @dryan 's comment, it's not a good experience for our content editors or clients to change their privacy settings to allow third-party cookies.

@garrettbear
Copy link

I'm seeing this issue in all major browsers now, desktop and tablet/phone, Safari and Chrome. +1 for @dryan 's comment, it's not a good experience for our content editors or clients to change their privacy settings to allow third-party cookies.

+1

@nonoumasy
Copy link

FIXED

on Chrome browsers, click on the icon on the url bar

Screen Shot 2021-10-11 at 9 18 00 PM

Then click on Cookies...

Screen Shot 2021-10-11 at 9 18 05 PM

A modal pops up. Click on the Blocked Tab and make sure you allow what
Screen Shot 2021-10-11 at 9 18 14 PM
ever url is there. Then you are good to go!

@matt123miller
Copy link

For future people searching I had a similar issue on Mac with Firefox when using Strict mode tracking protection.

Error:
"Disconnected from the dev server! To see your latest changes, restart the Studio with sanity start in your project folder."

Solution:
Added an exception for localhost by clicking the shield icon to the left of the URL bar
Screenshot 2022-03-02 at 16 40 29

@jdpnielsen
Copy link

jdpnielsen commented Mar 2, 2022

Seems the Sanity team are beta-testing a cookie-less auth mechanism. I wonder why they haven't announced that here:

knut (he/him) 1:14 AM
👋 Help us try out the Studio’s new cookie-less authentication! 🔒 🍪
The Studio uses a cookie to store your authentication token that’s sent with all its API requests (and nothing more). It’s no secret that the Studio login experience hasn’t been awesome for browsers that don’t like third party cookies, like Safari and Brave.
We have built a fall-back that should drastically improve the login experience in these browsers, using a similar approach that Firebase and Auth0 uses for their authentication strategies. Everything happens behind the scene, so the user experience of the login should pretty much be the same.
We need your help to test the new login. The only thing you need to do is to install the tagged versions of the core dependencies. The login should “just work” after this. Do test it with different browsers, with blockers and so on.
Let us know in this thread how it goes!
How to install the beta
Open up your studios package.json and modify the version numbers of the @sanity studio dependencies, eg from:

"@sanity/base": "^2.0.0",
"@sanity/core": "^2.0.0",
"@sanity/default-layout": "^2.0.0",
"@sanity/default-login": "^2.0.0",
"@sanity/desk-tool": "^2.0.0",
"@sanity/types": "^2.0.0",
"@sanity/vision": "^2.0.0",

to:

"@sanity/base": "cookieless-auth",
"@sanity/core": "cookieless-auth",
"@sanity/default-layout": "cookieless-auth",
"@sanity/default-login": "cookieless-auth",
"@sanity/desk-tool": "cookieless-auth",
"@sanity/types": "cookieless-auth",
"@sanity/vision": "cookieless-auth",

Then run sanity install (or yarn/npm install if you prefer) (edited)

@kmelve
Copy link
Member

kmelve commented Mar 3, 2022

@jdpnielsen Thanks for sharing! I was just about to do it here as well 😊

And let us know if it does(n't) work for you! Throw everything you got against it 🔥

@rexxars
Copy link
Member

rexxars commented Apr 25, 2022

v2.28.0 should resolve this issue! Let us know if it does not.

@rexxars rexxars closed this as completed Apr 25, 2022
@JKarlavige
Copy link

JKarlavige commented Sep 8, 2022

@rexxars I do not believe this issue is resolved, we are still experiencing it on our end (with Enhanced Tracking Protection disabled in Firefox). When first authenticating in Firefox, it redirects to: <studio-url>/desk#sid=<sid>, where we receive a 404 error.

If we keep Enhanced Tracking Protection enabled, we are unable to access the studio. If we disable Enhanced Tracking Protection, we still receive the 404 when it redirects to <studio-url>/desk#sid=<sid>. However, after we receive the 404 we can remove /desk#sid=<sid> from the URL and simply hit <studio-url>, which then loads the Studio as expected.

We are on version 2.30.2

@shoniisrael
Copy link

Para Usuarios de Chrome 2 PASOS:
1. Desabilita extensiones de adblockers o herramientas de cookies
(ej: fairAdblocker, ninja cokkie)
2. Permite cookies de terceros
(configuración->privacidad y seguridad->permitir todas las cookies )
Listo, Con esto deberia funcionar .

NOTA>>Si desean limitar un poco la privacidad del navegador pueden habilitar los permisos solo a la url afectada tanto las extensiones (suelen tener una opcion de whitelist )asi como la configuracion de las cookies (en la configuracion hay una opcion de Sitios que pueden usar cookies siempre)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

16 participants