Disabling 3rd party cookies in one's browser breaks blog comments login
If you disables 3rd party cookies, then you cannot login to an embedded blog comments discussion. Because then no user id cookie is sent to the Talkyard server, and then the server doesn't know you're logged in. In fact, the server replies null
to a get-user-data request, resulting in this error:
TypeError: Cannot read property 'id' of null
at Object.e.me_toBriefUser (https://c1.ty-cdn.net/-/assets/v0.6.30-WIP-1/slim-bundle.min.js:10:316262)
at Object.ID_1 (https://c1.ty-cdn.net/-/assets/v0.6.30-WIP-1/slim-bundle.min.js:10:339641)
at n.$Dispatcher_invokeCallback (https://c1.ty-cdn.net/-/assets/v0.6.30-WIP-1/slim-bundle.min.js:10:264736)
at n.dispatch (https://c1.ty-cdn.net/-/assets/v0.6.30-WIP-1/slim-bundle.min.js:10:264472)
at n.e.ReactDispatcher.handleViewAction (https://c1.ty-cdn.net/-/assets/v0.6.30-WIP-1/slim-bundle.min.js:10:265419)
at n (https://c1.ty-cdn.net/-/assets/v0.6.30-WIP-1/slim-bundle.min.js:10:304647)
at https://c1.ty-cdn.net/-/assets/v0.6.30-WIP-1/slim-bundle.min.js:10:308343
at https://c1.ty-cdn.net/-/assets/v0.6.30-WIP-1/slim-bundle.min.js:10:279445
As a temporary workaround, you can go here, in Chrome: chrome://settings/content/cookies?search=cookies
and add your Talkyard blog comments site to the Allow list (at the end of the page).
Apparently this also affects iOS and macOS users, with Safari and ITP (Intelligent Tracking Prevention) which can block 3rd party cookies (i.e. the login session cookie, in the embedded comments <iframe>
).
- KajMagnus @KajMagnus2019-04-18 09:32:57.386Z
The real solution is probably that Talkyard sends the user id not only in a cookie, but also in a HTTP header or in the request body. Then, all will work fine, also without cookies. (Albeit one will need to login, on each page load.)
This is b.t.w. already how anonymous guest login works, so maybe won't be too much trouble to do the same thing, also for real user accounts.
- Progresswith handling this problem
- KajMagnus @KajMagnus2019-04-30 14:07:00.449Z
'm currently trying out a fix over at my blog. Reportedly now works with macOS Safari and its cookie blocking ITP (previously, didn't).
- KajMagnus @KajMagnus2019-05-09 14:28:42.596Z
Fixed. Closing. Now blog comments work also with 3rd party cookies disabled, and with macOS and iOS ITP.
And if one's browser blocks cookies, then one stays logged in only until page reload.