添加Meteor登录google oauth
Add Meteor login google oauth
我试图创建一个简单的登录按钮在流星使用谷歌oauth按钮。我执行了以下命令
mrt创建帐户MRT添加账户-谷歌MRT add accounts-ui
我去掉了默认的html/css/js,并添加了:客户端/index . html服务器/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>
然而,配置我得到以下错误,当我试图启动服务器:W20140729-22:22:42.461 (5) ?(STDERR)W20140729-22:22:42.844 (5) ?(STDERR)/home/tim/.meteor/tools/cef2bcd356/lib/node_modules/纤维/future.js: 173W20140729-22:22:42.845 (5) ?(STDERR ) 把(ex);W20140729-22:22:42.845 (5) ?(STDERR ) ^W20140729-22:22:42.846 (5) ?类型错误:无法调用未定义的方法'remove'W20140729-22:22:42.846 (5) ?在app/server/config.js:1:71W20140729-22:22:42.847 (5) ?(STDERR)在app/server/config.js:11:3W20140729-22:22:42.847 (5) ?在/home/time/desktop/accounts/.meteor/local/build/programs/server/boot.js:161:10W20140729-22:22:42.849 (5) ?(STDERR)在数组。forEach(本地)W20140729-22:22:42.850 (5) ?(STDERR)函数。.each.。forEach (/home/tim/.meteor/工具/cef2bcd356/lib/node_modules/强调/underscore.js: 79:11)W20140729-22:22:42.851 (5) ?在/home/time/desktop/accounts/.meteor/local/build/programs/server/boot.js:82:5=>退出代码:8
配置是从一个旧的教程,所以我想知道如果代码是过时的,但我有困难找到任何更近期。有人知道发生了什么吗?
你所需要做的就是添加服务配置包:
meteor add service-configuration
干杯!
- 如何使用Google撤销Oauth令牌'的Javascript API
- 使用公共API访问(无OAuth)从JavaScript编写Google电子表格
- 使用 Google OAuth 2.0 进行客户端身份验证不起作用
- Google OAuth 2.0 SAMEORIGIN Error
- OAuth 2.0使用Google Client for JavaScript,获取权限被拒绝
- Google Analytics API OAuth 2.0 授权,不带弹出窗口
- WinRT Javascript 应用程序中的 Google API OAuth 2.0
- Google Apps Script 中基于 Twitter OAuth Pin 的授权“oob”
- Google OAuth gapi.auth.authorize X-Frame-Options: SAMEORIGIN
- 如何同时将OAUTH与Google Cloud Endpoints和Google Cloud Storage的gapi客
- 如何向 Google API 发出经过认证的 RESTful oAuth 2 后端请求
- Google, Facebook oauth Login for SPA,无需页面刷新
- 无法从OAuth Google API获取已安装应用程序的访问令牌
- Safari Can't在Google Oauth回调后获取Uri片段
- Google OAuth令牌过期
- Google API - Oauth 2.0 Auth token flow
- Google选取器未使用OAuth令牌
- Google OAuth一次性并保存访问令牌以备将来使用(长期访问令牌)
- oAuth使用Google API创建混合应用程序
- Google嵌入式分析API-找不到OAuth客户端