nraboy / ng-cordova-oauth

AngularJS oauth library for use with Apache Cordova projects
https://www.thepolyglotdeveloper.com
MIT License
456 stars 199 forks source link

Instagram login error (ERR_SPDY_PROTOCOL_ERROR) #340

Closed rastafan closed 6 years ago

rastafan commented 6 years ago

Hi,

we are facing a strange behaviour when loggin in using instagram. After inputting username and password and tapping confirm, it does not redirect the app to the redirectUri, but it goes to an instagram error page, saying it is not possible to load the requested page. Inspecting the page, we can see a "403" error with "ERR_SPDY_PROTOCOL_ERROR" error. We tought it was related to having an older version of cordovaoauth (0.2.9) so we updated to 0.3.0, but with no success.

We updated by copying the ng-cordova-oauth.min.js file from the dist folder to the js folder.

The following is the code we are using to login:

var clientID = "xxxxxxxxxxxxxx";
var redirectURL = "http://tinyurl.com/krmpchb"

$cordovaOauth.instagram(clientID, ["basic"], {
    redirect_uri: redirectURL
})
.then(function(result) {
    //OK
function(error) {
    //ERROR
});

The Disable implicit OAuth check on the instagram developer page is UNchecked. The app is already been approved more than a year ago (it worked fine then).

Is anyone facing the same problem, or does anyone know how we can fix this? Thanks.

rastafan commented 6 years ago

Solved, i had to add a "Content-Security-Policy" meta in index.html, it went to a completely different page and worked fine. Closing.