添加meteorlogin谷歌oauth

我正在尝试使用google oauth为Meteor中的button创build一个简单的loginbutton。 我执行了下面的命令

mrt创build帐户mrt添加帐户 – 谷歌mrt添加帐户 – 用户界面

我烧毁了默认的html / css / js,并添加了:client / index.html server / config.js

这里是config.js

Accounts.loginServiceConfiguration.remove({ service: "google" }); Accounts.loginServiceConfiguration.insert({ service: "google", clientId: "[redacted]", secret: "[redacted]" }) 

这里是index.html

 <head> <title>Accounts</title> </head> <body> {{loginButtons}} {{#if currentUser}} {{currentUser.profile.login}} {{/if}} </body> 

但是,在configuration中,当我尝试启动服务器时出现以下错误:W20140729-22:22:42.461(-5)? (STDERR)W20140729-22:22:42.844(-5)? (STDERR)/home/tim/.meteor/tools/cef2bcd356/lib/node_modules/fibers/future.js:173 W20140729-22:22:42.845(-5)? (STDERR)抛出(ex); W20140729-22:22:42.845(-5)? (STDERR)^ W20140729-22:22:42.846(-5)? (STDERR)TypeError:无法调用未定义W20140729-22:22:42.846(-5)的方法'remove'? (STDERR)在app / server / config.js:1:71 W20140729-22:22:42.847(-5)? (STDERR)在app / server / config.js:11:3 W20140729-22:22:42.847(-5)? (STDERR)at /home/tim/Desktop/accounts/.meteor/local/build/programs/server/boot.js:161:10 W20140729-22:22:42.849(-5)? (STDERR)Array.forEach(native)W20140729-22:22:42.850(-5)? (STDERR)在函数。 。每。 .forEach(/home/tim/.meteor/tools/cef2bcd356/lib/node_modules/underscore/underscore.js:79:11)W20140729-22:22:42.851(-5)? (STDERR)at /home/tim/Desktop/accounts/.meteor/local/build/programs/server/boot.js:82:5 =>退出代码:8

configuration是从一个旧的教程,所以我想知道如果代码是过时的,但我很难find更近的东西。 有谁知道发生了什么事?

所有你需要做的是添加service-configuration包使用:

 meteor add service-configuration 

干杯!