var client_id = '<32 DIGIT CLIENT ID>';var redirectUri = "chrome-extension://lgekckejcpodobwpelekldnhcbenimbe/oauth2";var auth_url = "https://www.pushbullet.com/authorize?client_id=" + client_id + "&redirect_uri=" + encodeURIComponent(redirectUri) + "&response_type=token";chrome.identity.launchWebAuthFlow({'url':auth_url,'interactive':true}, function(redirect_url){console.log(redirect_url)});
"permissions": ["identity","*://*.google.com/*","storage"],"web_accessible_resources": ["/oauth2/*"
Unchecked runtime.lastError while running identity.launchWebAuthFlow: The user did not approve access.
Callback URI from PushBullet: chrome-extension://lgekckejcpodobwpelekldnhcbenimbe/oauth2#access_token=o.zrrWrDozxMu6kftrMHb89siYJQhRVcoL
This is the working code, note the use of getRedirectURL.
background.js
var client_id = 'udHDSpoUZnFc0Q1xMFPdH6uu43rBqcpq';
var redirectUri = chrome.identity.getRedirectURL("oauth2");
var auth_url = "https://www.pushbullet.com/authorize?client_id=" + client_id + "&redirect_uri=" + redirectUri + "&response_type=token";
chrome.identity.launchWebAuthFlow({'url':auth_url,'interactive':true}, function(redirect_url){
console.log(redirect_url)
});manifest.js
"permissions": [
"identity",
"*://*.google.com/*",
"*://*.pushbullet.com/*",
"storage"
], I hope it might help someon else.
With best regards,
ShadowHunter