chrome extension stackapp auth 2.0 problem

40 views
Skip to first unread message

Lu Niu

unread,
May 1, 2015, 2:06:28 AM5/1/15
to chromium-...@chromium.org
I follow the tutorial here https://developer.chrome.com/apps/app_identity and use the api here https://developer.chrome.com/apps/identity but with no luck. Could anyone point out is anything wrong in this code?

function onGoogleLibraryLoaded() {
    var redirect_uri = chrome.identity.getRedirectURL("http://qqibrow.github.io");
    console.log(redirect_uri);
    console.log(full_url);
    chrome.identity.launchWebAuthFlow({
        'url': full_url,
        'interactive': true
    }, authorizationCallback);
}

var authorizationCallback = function (data) {
    // should print out redirect_uri with auth_token if succeed.
    console.log(data);
};

// manifest.json

"permissions": [
    "activeTab",
     "identity",
  ],
   "web_accessible_resources": [
      

If i try https://stackexchange.com/oauth/dialog?client_id=4716&redirect_uri=http://qqibrow.github.io it does work. But with above code, I always got a error page from stackexchange, saying that 

Application Login Failure error description: Cannot return to provided redirect_uri.


Reply all
Reply to author
Forward
0 new messages