-
Notifications
You must be signed in to change notification settings - Fork 899
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
Auth with Redirect Flow does not work with the most recent versions of Firefox #6443
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @matei-radu, thanks for opening this issue. Firebase Auth does not use cookies for There are three ways to mitigate this for the moment, listed below from easiest to most complicated:
|
Thanks for clarifying @sam-gc. I got so lost in the Mozilla material for their feature that I didn't realize the blocked resource is actually an iframe. They use the word cookie a lot for this. I was already considering switching to I assume then that this, with my current setup, is an expected behavior, right? In that case I think we can close the issue. |
In the end I went with the |
Describe your environment
5.18.12
, also tested with macOS12.4
102
9.3.0
, also tested9.9.0
auth
Describe the problem
Recently, Mozilla started rolling out their "Total Cookie Protection" feature enabled by default with Firefox (see blog post: https://blog.mozilla.org/en/products/firefox/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/). Firebase Auth with the Redirect Flow seems to rely on some cookies to complete the authentication, and these cookies are now partitioned (aka isolated) by this "Total Cookie Protection", preventing the Firebase JS SDK from completing the process.
Once the user is redirected back to the application, both
onAuthStateChanged
andgetRedirectResult
will invoke their callbacks withnull
instead of aUser
object. A warning message can also be seen in the console, like the following:The [Learn More] points to this: https://developer.mozilla.org/en-US/docs/Web/Privacy/Storage_Access_Policy/Errors/CookiePartitionedForeign.
Manually disabling this Firefox storage partitioning feature allows the Redirect Flow to function properly.
Steps to reproduce:
102
.about:config
in the URL bar, the search fornetwork.cookie.cookieBehavior
. If the value is set to5
then cookie partitioning is enabled. Values4
and0
differ in some way but in both cases partitioning is not enabled.onAuthStateChanged
andgetRedirectResult
will invoke their callbacks withnull
instead of aUser
object after you are redirected back to the application.network.cookie.cookieBehavior
to either4
or0
.The text was updated successfully, but these errors were encountered: