I wanted to port a WebExtension to Firefox and have noticed, that sent
XMLHttpRequest fail with 401 error. Digging down a bit I have noticed,
it happens only when 3rd party cookies are disabled in my
about:preferences. Is it a bug, or intentional behaviour? If that’s
intentional, how can I login a get a cookie in the extension?
It sounds like a bug then. I don’t think extensions should be affected by the cookie settings. I’m a bit surprised though, that this hasn’t come up before. You should look for a bug reporting this on bugzilla and file one if there is none.