Jump to content
McKay Development

changePassword don't works


Richi

Recommended Posts

Hi! I'm tryng to use changePassword function, but it returns eresult: 8

It doesn't works, or I just use it wrong?

Thanks.

 

There is the sample code which I use:

client.requestPasswordChangeEmail(password,  function(err) {
console.log("Req: "+ err);
var rl = require('readline').createInterface({
"input": process.stdin,
"output": process.stdout
});
rl.question('Code: ', function(code) {
client.changePassword(password, newpassword, code, function(err) { console.log(err);} );
console.log(code);
rl.close();
});
});
Link to comment
Share on other sites

Formatted code so it's actually readable:

client.requestPasswordChangeEmail(password,  function(err) {
    console.log("Req: "+ err);
    var rl = require('readline').createInterface({
        "input": process.stdin,
        "output": process.stdout
    });

    rl.question('Code: ', function(code) {
        client.changePassword(password, newpassword, code, function(err) {
            console.log(err);
        });

        console.log(code);
        rl.close();
    });
});

Where are you getting 8? When you request the email, or when you call changePassword?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...