0
我使用最新的ember-cli創建了一個簡單的ember.js應用程序。在一個簡單的功能,我稱之爲:Ember.js中的OAuth彈出錯誤
OAuth.initialize('my public key');
之後,我執行下面的代碼:
OAuth.popup('twitter').done(function(twitter) {
console.log(twitter);
}).fail(function(err) {
console.log('It didnt Worked');
});
彈出打開,我可以用我的Twitter帳戶登錄。然後在彈出的關閉,但在JavaScript控制檯中我看到了以下錯誤:
Could not retrieve methods TypeError: Cannot read property 'split' of undefined
at Object.module.exports.providers_api.generateMethods (http://localhost:8000/oauth.js:573:30)
at http://localhost:8000/oauth.js:967:17
at _fulfilled (http://localhost:8000/oauth.js:6263:54)
at Promise.then.Q.nextTick.self.promiseDispatch.done (http://localhost:8000/oauth.js:6292:30)
at Promise.promise.promiseDispatch (http://localhost:8000/oauth.js:6225:13)
at http://localhost:8000/oauth.js:6033:44
at runSingle (http://localhost:8000/oauth.js:5566:13)
at MessagePort.flush (http://localhost:8000/oauth.js:5554:13)
而OAuth的承諾從來沒有得到解決。該錯誤發生在OAuth.io Javascript SDK的oauth.js的第977行。
我使用以下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"
感謝您的幫助