Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ember.js 在余烬中通过google进行身份验证_Ember.js_Firebase_Firebase Authentication_Emberfire_Torii - Fatal编程技术网

Ember.js 在余烬中通过google进行身份验证

Ember.js 在余烬中通过google进行身份验证,ember.js,firebase,firebase-authentication,emberfire,torii,Ember.js,Firebase,Firebase Authentication,Emberfire,Torii,我正在尝试在我的Ember应用程序中使用Google和Facebook进行身份验证,但我无法正确配置它。我在google开发者网站上创建了这个项目,添加了oAuth,并在Firebase上启用了google。我遵循以下步骤: ember安装torii //config/environment.js /* ... */ 火基:'https://YOUR-FIREBASE-NAME.firebaseio.com/', 都灵:{ sessionServiceName:“会话” } /* ... */

我正在尝试在我的Ember应用程序中使用Google和Facebook进行身份验证,但我无法正确配置它。我在google开发者网站上创建了这个项目,添加了oAuth,并在Firebase上启用了google。我遵循以下步骤:

ember安装torii
//config/environment.js
/* ... */
火基:'https://YOUR-FIREBASE-NAME.firebaseio.com/',
都灵:{
sessionServiceName:“会话”
}
/* ... */
//Tori adapters/application.js
从“余烬”导入余烬;
从“emberfire/torii适配器/firebase”导入torii适配器;
导出默认的TorifiRebaseAdapter.extend({
firebase:Ember.inject.service()
});
//app/routes/application.js
从“余烬”导入余烬;
导出默认的Ember.Route.extend({
beforeModel:function(){
返回这个.get(“session”).fetch().catch(函数(){});
},
行动:{
签名:功能(提供程序){
this.get(“session”).open(“firebase”,{provider:provider})。然后(函数(数据){
console.log(data.currentUser);
});
},
注销:函数(){
this.get(“session”).close();
}
}
});
//app/templates/application.hbs
{{{#如果session.isAuthenticated}
以{{session.currentUser.displayName}身份登录
退出
{{outlet}}
{{else}
使用Twitter登录
{{/if}
我也不知道把这个片段放在哪里: this.get('session').open('firebase'{ 提供程序:“密码”, 电邮:'test@example.com', 密码:“password1234” });

以下是我遇到的错误:

Error while processing route: profile this.get(...) is undefined beforeModel@http://localhost:4200/assets/announce-me.js:245:14
applyHook@http://localhost:4200/assets/vendor.js:61326:16
HandlerInfo.prototype.runSharedModelHook@http://localhost:4200/assets/vendor.js:59517:20
HandlerInfo.prototype.runBeforeModelHook@http://localhost:4200/assets/vendor.js:59491:14
bind/<@http://localhost:4200/assets/vendor.js:61196:14
tryCatch@http://localhost:4200/assets/vendor.js:61543:14
invokeCallback@http://localhost:4200/assets/vendor.js:61558:15
publish@http://localhost:4200/assets/vendor.js:61526:9
@http://localhost:4200/assets/vendor.js:41428:7
Queue.prototype.invoke@http://localhost:4200/assets/vendor.js:10459:9
Queue.prototype.flush@http://localhost:4200/assets/vendor.js:10523:11
DeferredActionQueues.prototype.flush@http://localhost:4200/assets/vendor.js:10331:11
Backburner.prototype.end@http://localhost:4200/assets/vendor.js:10686:9
Backburner.prototype.run@http://localhost:4200/assets/vendor.js:10808:13
Backburner.prototype.join@http://localhost:4200/assets/vendor.js:10828:16
run.join@http://localhost:4200/assets/vendor.js:30439:12
run.bind/<@http://localhost:4200/assets/vendor.js:30502:14
jQuery.Callbacks/fire@http://localhost:4200/assets/vendor.js:3498:11
jQuery.Callbacks/self.fireWith@http://localhost:4200/assets/vendor.js:3628:7
.ready@http://localhost:4200/assets/vendor.js:3847:3
completed@http://localhost:4200/assets/vendor.js:3863:2
 vendor.js:37856:5

beforeModel@http://localhost:4200/assets/announce-me.js:245:14
applyHook@http://localhost:4200/assets/vendor.js:61326:16
HandlerInfo.prototype.runSharedModelHook@http://localhost:4200/assets/vendor.js:59517:20
HandlerInfo.prototype.runBeforeModelHook@http://localhost:4200/assets/vendor.js:59491:14
bind/<@http://localhost:4200/assets/vendor.js:61196:14
tryCatch@http://localhost:4200/assets/vendor.js:61543:14
invokeCallback@http://localhost:4200/assets/vendor.js:61558:15
publish@http://localhost:4200/assets/vendor.js:61526:9
@http://localhost:4200/assets/vendor.js:41428:7
Queue.prototype.invoke@http://localhost:4200/assets/vendor.js:10459:9
Queue.prototype.flush@http://localhost:4200/assets/vendor.js:10523:11
DeferredActionQueues.prototype.flush@http://localhost:4200/assets/vendor.js:10331:11
Backburner.prototype.end@http://localhost:4200/assets/vendor.js:10686:9
Backburner.prototype.run@http://localhost:4200/assets/vendor.js:10808:13
Backburner.prototype.join@http://localhost:4200/assets/vendor.js:10828:16
run.join@http://localhost:4200/assets/vendor.js:30439:12
run.bind/<@http://localhost:4200/assets/vendor.js:30502:14
jQuery.Callbacks/fire@http://localhost:4200/assets/vendor.js:3498:11
jQuery.Callbacks/self.fireWith@http://localhost:4200/assets/vendor.js:3628:7
.ready@http://localhost:4200/assets/vendor.js:3847:3
completed@http://localhost:4200/assets/vendor.js:3863:2
处理路由时出错:配置文件this.get(…)未定义beforeModel@http://localhost:4200/assets/announceme.js:245:14 applyHook@http://localhost:4200/assets/vendor.js:61326:16 原型。runSharedModelHook@http://localhost:4200/assets/vendor.js:59517:20 原型。runBeforeModelHook@http://localhost:4200/assets/vendor.js:59491:14
用于firebase的绑定/Torii提供程序

https://github.com/firebase/emberfire
也许你已经看过了


Jeff

firebase的Tori供应商

https://github.com/firebase/emberfire
也许你已经看过了

杰夫