dimanche 6 septembre 2015

OAuth Popup in Ember.js error

I create a simple ember.js app with the newest ember-cli. In a simple function I call:

OAuth.initialize('my public key');

After that I execute the following code:

OAuth.popup('twitter').done(function(twitter) {
        console.log(twitter);
    }).fail(function(err) {
        console.log('It didnt Worked');
    });

The popup opens and I can login with my twitter account. Then the popup closes but in the javascript console I see the following error:

Could not retrieve methods TypeError: Cannot read property 'split' of undefined
at Object.b.exports.generateMethods (http://localhost:4200/assets/vendor.js:90298:8846)
at http://localhost:4200/assets/vendor.js:90298:15294
at d (http://localhost:4200/assets/vendor.js:90300:4827)
at p.then.l.nextTick.h.promiseDispatch.j (http://localhost:4200/assets/vendor.js:90300:5100)
at p.d.promiseDispatch (http://localhost:4200/assets/vendor.js:90299:30944)
at http://localhost:4200/assets/vendor.js:90299:29716
at c (http://localhost:4200/assets/vendor.js:90300:2443)
at MessagePort.b (http://localhost:4200/assets/vendor.js:90300:2381)

And the OAuth promise never gets resolved.

I'm using the following verisons:

☮ ember -v
version: 1.13.8
node: 0.12.4
npm: 2.13.4
os: darwin x64
//OAuth installed via bower
OAuth.io: "oauth.io#~0.4.3"

Thanks for your help




Aucun commentaire:

Enregistrer un commentaire