This issue seems similar to Bug 1528562, but the fix for Bug 1528562 doesn't cover this additional scenario yet (and [the existing test case doesn't trigger it because it is using a POST but it is pointing it directly to the redirect_url](https://searchfox.org/mozilla-central/rev/fca0be7e2cf2f922c9b927423ce28e8a04b3fd90/toolkit/components/extensions/test/mochitest/oauth.html#12), instead of receiving a POST reply and then navigating to the redirect_uri because of the Location header).
Bug 1616596 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
~This issue seems similar to Bug 1528562, but the fix for Bug 1528562 doesn't cover this additional scenario yet (and [the existing test case doesn't trigger it because it is using a POST but it is pointing it directly to the redirect_url](https://searchfox.org/mozilla-central/rev/fca0be7e2cf2f922c9b927423ce28e8a04b3fd90/toolkit/components/extensions/test/mochitest/oauth.html#12), instead of receiving a POST reply and then navigating to the redirect_uri because of the Location header).~ While trying to trigger the same issue I'm able to trigger while trying identity.launchWebAuthFlow on a local test oauth server (using https://github.com/14gasher/oauth-example to run a demo oauth server locally), I noticed that our test case should already be testing exactly the scenario described above (POST http request + redirect due to a Location header in the POST http reply) and I've not been yet able to figure out what is different between what happens in the test case (which pass successfully with and without my patch) and when I trigger the issue on the local oauth demo server (where identity.launchWebAuthFlow is getting stuck without my patch).