Meteor React: Accounts.changePassword is undefined

Viewed 539

Setup: I'm using Meteor 1.4.4.2 with React and the accounts-password package (versions accounts-base@1.2.17, accounts-password@1.3.6).

Problem: When I import the accounts-password package (as instructed here) the function Accounts.changePassword is undefined. But other functions of the imported Accounts object are regularly defined, e.g. Accounts.setUsername.

Question: How to access the Accounts.changePassword function?

Code Snippet:

import {Meteor} from "meteor/meteor";
import {Accounts} from "meteor/accounts-base";

Meteor.methods({
  "changePassword"(oldPassword, newPassword, callback) {
    console.log(Accounts !== undefined); // => true
    console.log(Accounts.changePassword === undefined); // => true
    Accounts.changePassword(
      oldPassword, newPassword, callback
    ); // => Error
}

Thank you for your help!

1 Answers
Related