Access-Control-Allow-Credentials failure when trying to fetch the token

Apparently it was flutter all along.

The release build includes a service worker which has a handler like this:

self.addEventListener('fetch', function (event) {
  event.respondWith(
    caches.match(event.request)
      .then(function (response) {
        if (response) {
          return response;
        }
        return fetch(event.request, {
          credentials: 'include'
        });
      })
  );
});

As you can see, it forcefully injects credentials: 'include' into all the requests, thus making auth0 requests fail because they lack the Access-Control-Allow-Credentials.