我需要创建一个用于与外部服务进行OAuth认证的自定义包,但不知道如何制作。我尝试将accounts-github包克隆到我的项目中并进行修改,但它无法正常工作。这里有一些代码。
//test.html
<template name = 'test'>
<a href="#" class=".gitLogin">Login</a>
</test>
//test.js
Template.test.events({
'click .gitLogin': function() {
return Meteor.loginWithGithub();
}
});
这里出现了错误:
Meteor.loginWithGithub is not a function
我安装accounts-github包的步骤如下:
—clone from repo to app/packages directory
—modifyed name of package in package.js file
—meteor add my:package
—Donewithout any errors
但是你可以看到它并没有起作用。
主要问题:如何创建或修改现有软件包以使用另一个OAuth提供程序?
提供程序是wargaming.net,并不像Facebook或Google那样提供秘密代码。
附注:我正在使用Windows操作系统。
my-package
了吗? - Marcelo Schmidt