Handling authentification to Firebase Database with Fetch in a Service Worker
问题 I'm trying to query a Firebase database from a Service Worker using the Fetch API. However it doesn't work as expected as I can't get authenticated correctly. Basically what I'm trying to do is from origin https://myproject.firebaseapp.com inside a Service Worker I do a call like this : var fetchOptions = {}; fetchOptions.credentials = 'include'; var url = options.messageUrl; var request = new Request('https://myproject.firebaseio.com/user/foobar.json', fetchOptions); messagePromise = fetch