ParticipioLabs / realities

A tool for decentralised organisations.
https://realities.platoproject.org/
GNU Affero General Public License v3.0
35 stars 9 forks source link

Getting automatically logged out on localhost after 10-ish seconds in Firefox with Strict tracking protection #229

Closed Powersource closed 3 years ago

Powersource commented 3 years ago

Works in production at least

Idk if we were getting this before but there's an error in the console saying

Partitioned cookie or storage access was provided to “https://auth.platoproject.org/auth/realms/plato/protocol/openid-connect/login-status-iframe.html” because it is loaded in the third-party context and storage partitioning is enabled.

and pointing here https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Privacy/Storage_access_policy/Errors/CookiePartitionedForeign
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Privacy/State_Partitioning#dynamic_state_partitioning
https://blog.mozilla.org/security/2021/01/26/supercookie-protections/

So my current theory is that these heuristics hit us for some reason on localhost. I recently updated firefox on my machine.

Could also be related to fb1a3f8bbef41dfd4470d687647b681576834888 . At first that was broken (tests didn't even pass) because I hadn't updated the allowed redirect urls in keycloak, but that's done now so you can at least log in, if briefly, now. The issue could be related to some old cache or something around this.

Powersource commented 3 years ago

Screenshot of log

image

Tested and reproduces in private browsing as well

Powersource commented 3 years ago

Doesn't reproduce in chrome

Powersource commented 3 years ago

Only happens on Strict tracking protection in firefox, not Standard.

Tried upgrading react and oidc-react but didn't seem to help https://github.com/Edgeryders-Participio/realities/pull/230

Powersource commented 3 years ago

Opened an issue in oidc-client-js https://github.com/IdentityModel/oidc-client-js/issues/1321

Powersource commented 3 years ago

Fixing for now by me disabling Strict tracking protection :P

aerugo commented 3 years ago

So can we close this?

Powersource commented 3 years ago

mm sure but we should be ready for more strict 3rd party cookie blocking coming and biting us in the future