I'm currently developing a spotify app which requires oAuth to sign into GetGlue.
It successfully loads the authentication dialog box with the GetGlue service. However, when making its oauth callback, it returns the following JavaScript error: "Not allowed to load local resource: sp://getglue/" (sp://getglue being my app name).
I'm using the showAuthenticationDialog function as specified in the Spotify documentation:
auth.showAuthenticationDialog('http://getglue.com/oauth/authorize/?oauth_token='+_token+'&oauth_callback=sp://getglue', 'sp://getglue', {
onSuccess : function(response) {
console.log("Response: " + response);
},
onFailure : function(error) {
console.log("Error: " + error);
},
onComplete : function() { }
});
The closest to my issue I could find on the web was this stackoverflow issue - Twitter ouath callback in Spotify Apps. In that, the response says that:
"showAuthenticationDialog works by watching for requests to the URL given in the second parameter, then intercepting them and passing it to you in the callback instead"
This doesn't seem to be happening in my case?
Closing this authentication window then returns an error of 1? (e.g. "Error: 1" in my console.log)
Is there something that I'm missing here in my Spotify oAuth implementation?
Any help on this would be much appreciated.