mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add null support for options in Meteor.loginWithTwitter and Meteor.loginWithWeibo
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
(function () {
|
||||
Meteor.loginWithTwitter = function (callback) {
|
||||
// XXX support options.requestPermissions as we do for Facebook, Google, Github
|
||||
Meteor.loginWithTwitter = function (options, callback) {
|
||||
// support both (options, callback) and (callback).
|
||||
if (!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
|
||||
var config = Accounts.loginServiceConfiguration.findOne({service: 'twitter'});
|
||||
if (!config) {
|
||||
callback && callback(new Accounts.ConfigError("Service not configured"));
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
(function () {
|
||||
Meteor.loginWithWeibo = function (callback) {
|
||||
// XXX support options.requestPermissions as we do for Facebook, Google, Github
|
||||
Meteor.loginWithWeibo = function (options, callback) {
|
||||
// support both (options, callback) and (callback).
|
||||
if (!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
|
||||
var config = Accounts.loginServiceConfiguration.findOne({service: 'weibo'});
|
||||
if (!config) {
|
||||
callback && callback(new Accounts.ConfigError("Service not configured"));
|
||||
|
||||
Reference in New Issue
Block a user