Jump to content
McKay Development

Recommended Posts

Posted

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();
});
});
Posted

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?

Posted

It's 8 when I call changePassword. Request to email works good.

Found out that changePassword works, if account using without Mobile Authenicator. If the mobile authenticator is on, I get 8 even if I send 2fa token as "code".

Posted (edited)

Are you sure that you aren't reusing a 2FA code? My testing reveals that you get error 8 if you try to use a 2FA code which has already been used (perhaps to login).

Edited by Dr. McKay

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...