I am using chrome.identity.launchWebAuthFlow
to get a token from the MS graph API in ReactJS with TS.
If the extension popup closes for whatever reason, the auth window launched by chrome.identity
remains open - I do not want this behaviour.
As well as this, for some reason the close event between the auth window and the extension popup seem to be linked - when I close the auth window the extension closes too, which also stops any further code from running.
How do I stop this happening? I suspect the issues arise from the same problem.
Updates:
- Moved the API call and launchWebAuthFlow into a persistent service worker
- Changed my async/await calls so that it must wait before closing the extension
I'm considering creating as issue on the chromium bug report website? I'm really not sure what's causing this.