Now, I want to convert the Firefox extension from XPI to WebExtension for easier maintenance in the future (as Chrome and Firefox WebExtensions are very much alike).
I thought the migration should be easy as I already got two versions of extensions on hand. But after some research I can’t find an easy way to access the OAuth 2.0 inside the Firefox WebExtension.
It says copy the REDIRECT_URL from the about:addons > preferences but I couldn’t find it. Maybe it’s because the post is quite old (around 7 years). I used const REDIRECT_URL = browser.identity.getRedirectURL(); this instead, and it worked!