@MicrosoftEdge Can not use Edge extension API webRequest.onAuthRequired for async credentials #EdgeBug

Issue #11850840 • Assigned to Kiril S.

Details

Created
May 1, 2017
Privacy
This issue is public.
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

    • Hello,

      Thank you for providing extensive information about this issue. A Microsoft Edge Extension does not support the Promise model; this is a documented difference between Mozilla and Edge’s platform. Currently, we do not plan to release a fix, so you will need to use a function with a callback, instead.

      Best Wishes,
      The MS Edge Team

    • Microsoft Edge Team

      Changed Assigned To to “Sermet I.”

    • Thank you, James!

      Could you give me a hint on where this is documented? I’ve looked into Supported APIs but that page only links to MDN, which describes the Promise-based API.

      I have also tried to use the “chrome style” API in Edge like this:

      browser.webRequest.onAuthRequired.addListener(
        function(info, asyncCallback) {
          setTimeout(function() {
            asyncCallback({
              authCredentials: {
                username: "myusername",
                password: "mypassword"
              }
            });
          }, 3000);
        },
        {
          urls: [
            "https://myurl.example.org/api/auth*"
          ]
        },
        ["asyncBlocking"]);
      

      But that doesn’t work either. In that case the tab just keeps loading until an error message appears that says the page is not responding.

    • Microsoft Edge Team

      Changed Assigned To from “Sermet I.” to “Kiril S.”

    • That’s actually something I’d be interested in knowing.

      Particularly of the above outlined APIs actually do work & are supported in Edge? The MDN page states that Edge actually supports asyncBlocking flag and it should work with a callback approach.

    You need to sign in to your Microsoft account to add a comment.

    Sign in