添加 loginWith<service> 中未包含的外部登录服务
Add external login service not included in loginWith<service>
我想使用 battlenet. This is not included in Meteor.loginWithService 对用户进行身份验证,但 atmosphere 上没有可实现此目的的软件包。
我找到了 this example。该库似乎引用了旧版本的 Meteor。我正在使用 Meteor 1.0.32.
虽然我能够更改 Meteor.accounts
和其他细节,但我找不到合适的替代品来注册新的 oauth 服务。当我尝试使用此函数时,从未调用回调。
console.log("Want to now register a service");
Accounts.oauth.registerService('battlenet', 2, function(query) {
console.log("Registering service now...");
我打开控制台,发现Accounts.oauth.registerService
只有一个参数name
。
在 Meteor 1.0+ 中注册新的外部 oauth 提供程序的合适方法是什么?
我认为最好的解决方案是创建一个新的 local package
。
看看 ehe meteor-accounts-stripe 它是这里最好的例子,有了它你可以了解如何创建一个新的 OAuth package
并可能将它上传到大气中,也许其他人喜欢你以后会用到的。
我想使用 battlenet. This is not included in Meteor.loginWithService 对用户进行身份验证,但 atmosphere 上没有可实现此目的的软件包。
我找到了 this example。该库似乎引用了旧版本的 Meteor。我正在使用 Meteor 1.0.32.
虽然我能够更改 Meteor.accounts
和其他细节,但我找不到合适的替代品来注册新的 oauth 服务。当我尝试使用此函数时,从未调用回调。
console.log("Want to now register a service");
Accounts.oauth.registerService('battlenet', 2, function(query) {
console.log("Registering service now...");
我打开控制台,发现Accounts.oauth.registerService
只有一个参数name
。
在 Meteor 1.0+ 中注册新的外部 oauth 提供程序的合适方法是什么?
我认为最好的解决方案是创建一个新的 local package
。
看看 ehe meteor-accounts-stripe 它是这里最好的例子,有了它你可以了解如何创建一个新的 OAuth package
并可能将它上传到大气中,也许其他人喜欢你以后会用到的。