{"size": 1071, "ext": "js", "max_stars_repo_path": "your_membership.js", "max_stars_repo_name": "pathable/accounts-your-membership", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "your_membership.js", "max_issues_repo_name": "pathable/accounts-your-membership", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "your_membership.js", "max_forks_repo_name": "pathable/accounts-your-membership", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.5, "max_line_length": 94, "alphanum_fraction": 0.7058823529}
Accounts.oauth.registerService("yourMembership");

if (Meteor.isClient) {
  const loginWithYourMembership = (options, callback) => {
    // support a callback without options
    if (!callback && typeof options === "function") {
      callback = options;
      options = null;
    }

    const credentialRequestCompleteCallback = Accounts.oauth.credentialRequestCompleteHandler(
      callback
    );
    YourMembership.requestCredential(
      options,
      credentialRequestCompleteCallback
    );
  };
  Accounts.registerClientLoginFunction(
    "yourMembership",
    loginWithYourMembership
  );
  Meteor.loginWithYourMembership = (...args) =>
    Accounts.applyLoginFunction("yourMembership", args);
} else {
  Accounts.addAutopublishFields({
    // not sure whether the github api can be used from the browser,
    // thus not sure if we should be sending access tokens; but we do it
    // for all other oauth2 providers, and it may come in handy.
    forLoggedInUser: ["services.yourMembership"],
    forOtherUsers: ["services.yourMembership.username"],
  });
}
